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

BackgroundObserver should decide about collapsing external events based on backend

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      This is a follow up of OAK-3372. With OAK-3372, BackgroundObserver by default won't collapse external events if observation queue is not full. Although, it exposes a system property to control the behavior, but it's better if this is done based on persistence used in the back-end.

      The reason to still have the collapse is because of this comment

      I assume whenever cluster support comes it there'd some way where external changes are polled for and kept.

      Probably yes but I don't want to speculate too much here as there are currently no plans to that extend. However, the way segment node store works it might be favourable to have this collapsing in place anyway. So I'd rather keep it but add an option to disable it if the back end chooses to. Maybe the commit info could be used to convey that information in a backward compatible way?

      A couple of approaches to do it were mentioned here

      • Background observer can be passed the configuration to collapse/not-collapse external events early using descriptors
      • Since external event can't have non-null commit info, we might hack around and add some extra data into local events - that extra info essentially can configure the background observer. Apart from this being very hacky, it's also hard to generate solve the case when there are no local events getting generated

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              catholicon Vikas Saurabh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: