alanlau28 commented on code in PR #23298:
URL: https://github.com/apache/kafka/pull/23298#discussion_r3972814271


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorStateManager.java:
##########
@@ -92,13 +92,15 @@ public static class StateStoreMetadata {
         // applied to the store used for both restoration (active and standby 
tasks restored offset) and
         // normal processing that update stores (written offset); could be 
null (when initialized)
         //
-        // the offset is updated in three ways:
+        // the offset is updated in four ways:
         //   1. when loading from the checkpoint file, when the corresponding 
task has acquired the state
         //      directory lock and have registered all the state store; it is 
only one-time
         //   2. when updating with restore records (by both restoring active 
and standby),
         //      update to the last restore record's offset
         //   3. when checkpointing with the given written offsets from record 
collector,
         //      update blindly with the given offset
+        //   4. when restoration reaches a confirmed catch-up boundary with no 
further records to apply
+        //      (KAFKA-14302), as last-applied = next-fetch - 1, never moving 
backwards

Review Comment:
   Maybe note that standbys reach the *limit* offset, not the end offset?
   
   ```java
   //   4. when restoration reaches the end offset (the limit offset for 
standbys) with no further
   //      records to apply, update to next-fetch minus one (last-applied); 
never moves backwards
   ```



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

Reply via email to