Hi,
every node in our event store cluster throws the following error when attempting to scavenge:
[PID:32164:081 2016.08.01 14:28:25.563 INFO AdminController ] Request scavenging because /admin/scavenge request has been received.
[PID:32164:076 2016.08.01 14:28:25.563 TRACE TFChunkScavenger ] SCAVENGING: started scavenging of DB. Chunks count at start: 178. Options: alwaysKeepScavenged = False, mergeChunks = True
[PID:32164:076 2016.08.01 14:28:25.564 TRACE TFChunkScavenger ] SCAVENGING: started to scavenge & merge chunks: #0-23 (chunk-000000.000003)
Resulting temp chunk file: 347cd0de-e731-4b3b-97d1-7aa52802aceb.scavenge.tmp.
[PID:32164:076 2016.08.01 14:28:47.767 ERROR StorageScavenger ] SCAVENGING: error while scavenging DB.
System.Exception: Could not read latest stream’s prepare. That should never happen.
at EventStore.Core.Services.Storage.ReaderIndex.IndexReader.GetStreamLastEventNumberUncached (TFReaderLease reader, System.String streamId) [0x00000] in :0
at EventStore.Core.Services.Storage.ReaderIndex.IndexReader.GetStreamLastEventNumberCached (TFReaderLease reader, System.String streamId) [0x00000] in :0
at EventStore.Core.Services.Storage.ReaderIndex.IndexReader.EventStore.Core.Services.Storage.ReaderIndex.IIndexReader.GetStreamLastEventNumber (System.String streamId) [0x00000] in :0
at EventStore.Core.Services.Storage.ReaderIndex.ReadIndex.EventStore.Core.Services.Storage.ReaderIndex.IReadIndex.GetStreamLastEventNumber (System.String streamId) [0x00000] in :0
at EventStore.Core.TransactionLog.Chunks.TFChunkScavenger.ShouldKeepPrepare (EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord prepare, System.Collections.Generic.Dictionary`2 commits, Int64 chunkStart, Int64 chunkEnd) [0x00000] in :0
at EventStore.Core.TransactionLog.Chunks.TFChunkScavenger+c__AnonStorey1.<>m__1 (EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord prepare) [0x00000] in :0
at EventStore.Core.TransactionLog.Chunks.TFChunkScavenger.TraverseChunk (EventStore.Core.TransactionLog.Chunks.TFChunk.TFChunk chunk, System.Action1 processPrepare, System.Action
1 processCommit, System.Action`1 processSystem) [0x00000] in :0
at EventStore.Core.TransactionLog.Chunks.TFChunkScavenger.ScavengeChunks (Boolean alwaysKeepScavenged, IList`1 oldChunks, System.Int64& spaceSaved) [0x00000] in :0
at EventStore.Core.TransactionLog.Chunks.TFChunkScavenger.Scavenge (Boolean alwaysKeepScavenged, Boolean mergeChunks) [0x00000] in :0
at EventStore.Core.Services.Storage.StorageScavenger.Scavenge (EventStore.Core.Messages.ScavengeDatabase message) [0x00000] in :0
This error occurs on old 3.0.5 nodes AND on new 3.8.1 nodes (All nodes run on CentOS el7).
Note: new nodes have data files copied from old nodes since “caching up” fails after some time
What would you suggest as a course of actions to fix this scavenge error? We would like to recover some 30+ GB of hard drive space.