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

PersistentCache: failure during construction may lead to resource leak

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

Details

    Description

      In the constructor:

              readGeneration = generations.size() > 1 ? generations.first() : -1;
              writeGeneration = generations.size() > 0 ? generations.last() : 0;
              if (readGeneration >= 0) {
                  readStore = createMapFactory(readGeneration, true);
              }
              writeStore = createMapFactory(writeGeneration, false);
              initBroadcast(broadcast);
      

      ...so if createMapFactory fails for writeStore, readStore will not be closed.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            reschke Julian Reschke
            reschke Julian Reschke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment