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

FileStore.flush prone to races leading to corruption

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      There is a small window in FileStore.flush that could lead to data corruption: if we crash right after setting the persisted head but before any delay-flushed SegmentBufferWriter instance flushes (see SegmentBufferWriterPool.returnWriter()) then that data is lost although it might already be referenced from the persisted head.

      We need to come up with a test case for this.

      A possible fix would be to return a future from SegmentWriter.flush and rely on a completion callback. Such a change would most likely also be useful for OAK-3690.

        Attachments

        1. OAK_4291.patch
          8 kB
          Michael Dürig
        2. OAK_4291-UTs.patch
          8 kB
          Michael Dürig
        3. OAK-4291-02.patch
          15 kB
          Francesco Mari

        Issue Links

          Activity

            People

            • Assignee:
              mduerig Michael Dürig
              Reporter:
              mduerig Michael Dürig

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment