Affects Version/s: 1.5.14
Fix Version/s: None
OAK-4796 changed the model how commits are filtered for processing by the individual observation listeners. Each BackgroundObserver has a queue of content changes (ie commits) that are ready for being filtered, converted to events and then delivered to listeners.
OAK-4796 the filtering of those observation events happened at the head of the queue, ie at dequeue time. Thus when switching the filter for an observation listener it would be applied to all still queued changes as they are being processed.
OAK-4796 and its introduction of prefiltering, this filtering now happens at the tail of the queue, ie at enqueue time first with the prefilter, and later on with the normal filter at dequeue time. In essense there are now 2 filtering steps. Thus when switching the filter for an observation listener and that listener had changes in its queue, the effect would be that still enqueued changes would have been gone through the prefilter based on the old filter and of the normal filter based on the new filter.
An improvement is to pass the filter applied in the prefilter along in the queue and use the same later on for doing the normal filtering. And the filter change would then be applied on the prefilter alone.