Skip to content

Commit

Permalink
fix: wal recovery (#604)
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zhanhui <[email protected]>
  • Loading branch information
lizhanhui authored Nov 10, 2023
1 parent 274ea8e commit 3511237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3stream/src/main/java/com/automq/stream/s3/S3Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ LogCache.LogCacheBlock recoverContinuousRecords(Iterator<WriteAheadLog.RecoverRe
if (!records.isEmpty()) {
long startOffset = records.get(0).getBaseOffset();
long expectedStartOffset = openingStreamEndOffsets.getOrDefault(streamId, startOffset);
if (startOffset > expectedStartOffset) {
throw new IllegalStateException(String.format("[BUG] WAL data may lost, streamId %s endOffset=%s from controller, " +
if (startOffset != expectedStartOffset) {
throw new IllegalStateException(String.format("[BUG] WAL data may lost, streamId %d endOffset=%d from controller, " +
"but WAL recovered records startOffset=%s", streamId, expectedStartOffset, startOffset));
}
}
Expand Down

0 comments on commit 3511237

Please sign in to comment.