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

File Store GC leaves the Store in an unconsistent state

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Not A Problem
    • 1.42.0
    • None
    • segment-tar, segmentmk
    • None

    Description

      I created a File Store using Jackrabbit Oak v. 1.42.0.

      I added some nodes, and then deleted some of them.

      I then inspect the "history" of the store, using the very same code used by oak-run - but executed in my application (no OSGi):

      Iterator<RevisionHistory.HistoryElement> history = new RevisionHistory(fileStoreFolder).getHistory(
              new LocalJournalFile(journal),
              path);
      while (history.hasNext()) {
          printWriter.println(history.next().toString(depth));
      } 

      I got the following output:

      7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
      c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
      8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
      55db2d1f-ffb0-4c47-ab7f-eca779bb4e08:450={"root":{}}
      daadf7ca-0183-4a93-a94a-0c2347c89443:302={"root":{}}
      fd234c75-9329-41f1-a9be-f7cef1d2ae7b:371={"root":{}}
      3e86d6a1-76a5-4983-a779-48b3ee0e98fd:6={"root":{}}
      5d05a2d8-f239-4fa0-a643-27bd281a6573:7102={"root":{}} 

      that is fine - as far as I can tell.

      Then, I run fileStore.fullGC(); - log attached full_gc.log.

      Then, I run again the code that inspect the history, and I got the following output:

      10cedc98-86ed-4a48-a22b-18fe8c34ed3e:7424={"root":{}}
      7b35a984-cf56-4a6d-a571-db38ac0f12aa:6={"root":{}}
      c5b06947-64ea-48b9-a0c9-dbb65fdefb82:147={"root":{}}
      8c0036ef-0160-4f6c-a408-a956f38b421d:7653={"root":{}}
      
      Segment 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08 not found

      The expected behaviour is that:

      • either revision 55db2d1f-ffb0-4c47-ab7f-eca779bb4e08 is no more present in the history of the file store
      • or revision is present and can be found

      Despite this issue, it seems that everything is running smoothly, but I cannot tell whether this issue will bug some thing at some point.

      Also note that, if I stop my application and run oak-run compact from the command line, the troubled revision is removed and I end up with just one revision:

      Apache Jackrabbit Oak 1.42.0
      07:53:00.534 [main] WARN  o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry: 
      07:53:00.549 [main] WARN  o.a.j.oak.segment.file.JournalReader - Skipping invalid journal entry: 
      635924e4-2e18-4bad-ac43-7347f4b1dfe0:7424={"root":{}}
       

      (Please also note the two warnings printed by oak-run…).

       

      Attachments

        1. full_gc.log
          2 kB
          Piercarlo Slavazza

        Activity

          People

            Unassigned Unassigned
            piercarlo_s Piercarlo Slavazza
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: