You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/06/24 17:27:08 UTC

[GitHub] [kafka] guozhangwang opened a new pull request, #12344: MINOR: Use mock time in DefaultStateUpdaterTest

guozhangwang opened a new pull request, #12344:
URL: https://github.com/apache/kafka/pull/12344

   1. For most tests we would need an auto-ticking mock timer to work with draining-with-timeout functions.
   2. For tests that check for never checkpoint we need no auto-ticking timer to control exactly how much time elapsed.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] guozhangwang commented on a diff in pull request #12344: MINOR: Use mock time in DefaultStateUpdaterTest

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on code in PR #12344:
URL: https://github.com/apache/kafka/pull/12344#discussion_r910175638


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -366,6 +364,8 @@ public void start() {
             stateUpdaterThread.start();
             shutdownGate = new CountDownLatch(1);
         }
+        // initialize the last commit as of now to prevent first commit happens immediately
+        this.lastCommitMs = time.milliseconds();

Review Comment:
   Ack!



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] cadonna commented on a diff in pull request #12344: MINOR: Use mock time in DefaultStateUpdaterTest

Posted by GitBox <gi...@apache.org>.
cadonna commented on code in PR #12344:
URL: https://github.com/apache/kafka/pull/12344#discussion_r909295030


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/DefaultStateUpdater.java:
##########
@@ -366,6 +364,8 @@ public void start() {
             stateUpdaterThread.start();
             shutdownGate = new CountDownLatch(1);
         }
+        // initialize the last commit as of now to prevent first commit happens immediately
+        this.lastCommitMs = time.milliseconds();

Review Comment:
   Shouldn't this go inside the `if`-branch? Otherwise it would be possible to change the last committed time of already started state updaters.



-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] guozhangwang merged pull request #12344: MINOR: Use mock time in DefaultStateUpdaterTest

Posted by GitBox <gi...@apache.org>.
guozhangwang merged PR #12344:
URL: https://github.com/apache/kafka/pull/12344


-- 
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: jira-unsubscribe@kafka.apache.org

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


[GitHub] [kafka] guozhangwang commented on pull request #12344: MINOR: Use mock time in DefaultStateUpdaterTest

Posted by GitBox <gi...@apache.org>.
guozhangwang commented on PR #12344:
URL: https://github.com/apache/kafka/pull/12344#issuecomment-1170259840

   @cadonna updated per your comment.


-- 
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: jira-unsubscribe@kafka.apache.org

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