OneSizeFitsQuorum commented on code in PR #1175:
URL: https://github.com/apache/ratis/pull/1175#discussion_r1837395587
##########
ratis-server/src/main/java/org/apache/ratis/server/raftlog/segmented/SegmentedRaftLogCache.java:
##########
@@ -364,6 +364,9 @@ TruncationSegments purge(long index) {
list.addAll(segments);
segments.clear();
sizeInBytes = 0;
+ } else if (segmentIndex == -1) {
Review Comment:
When segments is Empty, it seems code will go to `if (segmentIndex ==
-segments.size() - 1) {` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]