Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5208

Improve observation filter switching while events are queued

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.14
    • None
    • jcr
    • None

    Description

      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.
      Prior to 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.
      With 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stefanegli Stefan Egli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: