bshashikant commented on a change in pull request #2704:
URL: https://github.com/apache/ozone/pull/2704#discussion_r758027826



##########
File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
##########
@@ -862,6 +892,12 @@ public void notifyTermIndexUpdated(long term, long index) {
     return future;
   }
 
+  @Override
+  public void notifyNotLeader(Collection<TransactionContext> pendingEntries) {
+    // once the leader steps down , clear the cache
+    evictStateMachineCache();

Review comment:
       Th new leader will resend only if a follower doesn't have the log entry 
itself even if the entry exists in the stateMachineDataCache.
   
    A follower by default doesn't have any entry in the stateMachine cache but 
only the leader.  




-- 
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]

Reply via email to