szetszwo commented on code in PR #4499:
URL: https://github.com/apache/ozone/pull/4499#discussion_r1152864646
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -996,7 +996,7 @@ public void notifyNotLeader(Collection<TransactionContext>
pendingEntries) {
@Override
public CompletableFuture<Void> truncate(long index) {
- stateMachineDataCache.removeIf(k -> k >= index);
+ stateMachineDataCache.removeIf(k -> k <= index);
Review Comment:
@sumitagrawl , For `truncate`, it should be `k > index`, i.e. removed the
truncated entries.
The change looks good other than that.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]