guozhangwang commented on a change in pull request #8964:
URL: https://github.com/apache/kafka/pull/8964#discussion_r459859152



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/StandbyTask.java
##########
@@ -93,8 +93,8 @@ public boolean isActive() {
     public void initializeIfNeeded() {
         if (state() == State.CREATED) {
             StateManagerUtil.registerStateStores(log, logPrefix, topology, 
stateMgr, stateDirectory, processorContext);
-
             // initialize the snapshot with the current offsets as we don't 
need to commit then until they change

Review comment:
       We maintain two snapshots in standby because its `commitNeeded` is 
overridden such that we only commit if the offsets has changed since last time 
committed, whereas in active we have the flag itself to indicate so.
   
   I can add the above explanation for `offsetSnapshotSinceLastCommit`, would 
that be clearer?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to