-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
I think the determination of the droppedEntriesCount for a given observer can be inconsistent with the data reported to the observer. This is because we flush the entries in the buffers when using the buffered option and start listening to entries when calling observe, but the determination of droppedEntriesCount happens when the callback is invoked.
Let's take the following example:
- We create an observer and call
observeforresourcetype, with the buffered option set totrue.- At that moment, the observer buffer is filled with all the existing entries in the buffer.
- Multiple entries of type
resourceare added to the buffer. The buffer becomes full and drops N entries, but the previous observer didn't miss any entries as they were added to its buffer. - The observer callback is invoked with the entries in its buffer. The observer didn't miss any entries and
droppedEntriesCountis N (inconsistent with the data reported to the observer).
I think the determination of droppedEntriesCount should be made in observe, not in the execution of its callback.
Metadata
Metadata
Assignees
Labels
No labels