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

PersistentCache: failure during construction may lead to resource leak

    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

        1. OAK-8052.diff
          2 kB
          Julian Reschke

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: