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

BackgroundObserver close should wait for stop to be processed

    XMLWordPrintableJSON

Details

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

    Description

      BackgroundObserver close method currently says that it does not wait for thread to finish. This can lead to situation when during shutdown the backing NodeStore goes away while the background thread is still busy with diff and that would lead to exceptions in the log.

      As being done in OAK-3923 the close call should wait for STOP signal to be processed before returning from close call.

      On side note we should also provide an option where the close call should wait for the queue to be processed instead of just silently clearing the queue which can lead to potential loss of important local events. Note that can happen for proper ordered shutdown!

      Attachments

        1. OAK-3952-v1.patch
          6 kB
          Chetan Mehrotra

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: