Skip to content

Commit 40a09b2

Browse files
committed
address some comments
1 parent a600e9e commit 40a09b2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

fluss-server/src/main/java/org/apache/fluss/server/log/LogLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ private Tuple2<Long, Long> recoverLog() throws IOException {
195195
logSegments.getTableBucket(),
196196
startOffset);
197197
truncatedBytes = segment.truncateTo(startOffset);
198+
} else {
199+
throw e;
198200
}
199201
}
200202

fluss-server/src/test/java/org/apache/fluss/server/log/LogLoaderTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ void testCorruptIndexRebuild() throws Exception {
143143
}
144144
assertThat(numRecords).isEqualTo(logTablet.localLogEndOffset());
145145
for (int i = 0; i < numRecords; i++) {
146-
assertThat(i)
147-
.isEqualTo(logTablet.lookupOffsetForTimestamp(clock.milliseconds() + i * 10));
146+
assertThat(logTablet.lookupOffsetForTimestamp(clock.milliseconds() + i * 10))
147+
.isEqualTo(i);
148148
}
149149
logTablet.close();
150150
}
@@ -221,8 +221,8 @@ void testIndexRebuild() throws Exception {
221221
assertThat(logTablet.logSegments().get(0).offsetIndex().entries() > 0).isTrue();
222222
assertThat(logTablet.logSegments().get(0).timeIndex().entries() > 0).isTrue();
223223
for (int i = 0; i < numRecords; i++) {
224-
assertThat(i)
225-
.isEqualTo(logTablet.lookupOffsetForTimestamp(clock.milliseconds() + i * 10));
224+
assertThat(logTablet.lookupOffsetForTimestamp(clock.milliseconds() + i * 10))
225+
.isEqualTo(i);
226226
}
227227
logTablet.close();
228228
}

0 commit comments

Comments
 (0)