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

SIFS throws exception if told to compact a partially written entry

XMLWordPrintable

      If a data file is created and the process is killed in the middle of persisting to disk it is possible to not serialize the entry. In this case the value is not in the index either so we should be able to just ignore the rest of the file.

      14:26:22,124 TRACE (blocking-thread-SoftIndexFileStoreStressTest-NodeA-p3-t4:[]) [o.i.p.s.Compactor] Completing compaction for file: 2 due to exception!
      java.lang.IllegalStateException: End of file reached when reading key on 2:0
          at org.infinispan.persistence.sifs.Compactor.compactSingleFile(Compactor.java:482) ~[classes/:?]
          at org.infinispan.persistence.sifs.Compactor.accept(Compactor.java:433) ~[classes/:?]
          at io.reactivex.rxjava3.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) ~[rxjava-3.1.4.jar:?]
          at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:270) ~[rxjava-3.1.4.jar:?]
      

      We should just skip that entry and log a WARN message that compactor found a corrupted data file that was most likely caused by shutdown while appending.

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

              Created:
              Updated:
              Resolved: