Skip to content

Commit

Permalink
bugfix: truncateSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
wenweihu86 committed Feb 23, 2020
1 parent 128a159 commit b405f54
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void truncateSuffix(long newEndIndex) {
segment.getRandomAccessFile().close();
String fullFileName = logDataDir + File.separator + segment.getFileName();
FileUtils.forceDelete(new File(fullFileName));
startLogIndexSegmentMap.remove(segment.getFileName());
startLogIndexSegmentMap.remove(segment.getStartIndex());
} else if (newEndIndex < segment.getEndIndex()) {
int i = (int) (newEndIndex + 1 - segment.getStartIndex());
segment.setEndIndex(newEndIndex);
Expand Down

0 comments on commit b405f54

Please sign in to comment.