Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14753

Prevent SoftIndexFileStore Compactor from running multiple times

    XMLWordPrintable

Details

    Description

      There have been a couple attempts to get the Compactor to behave properly with expiration running concurrently in ISPN-13747 and ISPN-14187. This closes many loop holes, but there is still an issue that can cause

      ISPN029021: File id 1809 encountered an exception while compacting, file may be orphaned java.lang.NullPointerException: No index info found for key: WrappedByteArray[\R10\k\e\y\:\0\0\0\0\3\4\7\2\9\7\9\1 (18 bytes)]

      This can happen if the expiration reaper runs and a data file is present but not in the file stats that it still "compacts" it and add it to the stats. Then later the file may be compacted as the data becomes no longer valid. This can cause the index to decrement the numRecords an additional time and eventually cause the exception when trying to access that key again.

      We really need to completely isolate compactor running so that it can only ever be scheduled once (only exception is a log file may need to be scheduled again at a later point when it is completed). Instead we should atomically set the scheduled flag whenever a file is compacted, thus ensuring it is only ever done once. In the case of a logFile we will need to unset it after it runs so that it can be scheduled at a later point after it has completed.

      Attachments

        Issue Links

          Activity

            People

              wburns@redhat.com Will Burns
              wburns@redhat.com Will Burns
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: