adoroszlai commented on code in PR #4499:
URL: https://github.com/apache/ozone/pull/4499#discussion_r1154323583
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -874,7 +874,7 @@ public CompletableFuture<Message>
applyTransaction(TransactionContext trx) {
// if waitOnBothFollower is false, remove the entry from the cache
// as soon as its applied and such entry exists in the cache.
if (!waitOnBothFollowers) {
- stateMachineDataCache.removeIf(k -> k >= index);
+ stateMachineDataCache.removeIf(k -> k <= index);
Review Comment:
Thanks. Sorry if it was not clear, but I meant extracting the
`stateMachineDataCache.removeIf(k -> k <= index);` line to a method that can
then be called from both places where `<=` condition is used.
--
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]