kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject [kafka] branch 1.1 updated: KAFKA-6731: waitOnState should check the state to be the target start. (#4808)
Date Mon, 02 Apr 2018 17:43:35 GMT
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch 1.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/1.1 by this push:
     new 160b860  KAFKA-6731: waitOnState should check the state to be the target start. (#4808)
160b860 is described below

commit 160b860392a1b9636c53bad5cd0cfa24f6f80173
Author: huxi <huxi_2b@hotmail.com>
AuthorDate: Mon Apr 2 11:36:25 2018 +0800

    KAFKA-6731: waitOnState should check the state to be the target start. (#4808)
    
    KafkaStreams.waitOnState() should check the state to be the given one instead of the hard-coded
`NOT_RUNNING`.
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
index 1a70e46..08120ef 100644
--- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
+++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
@@ -215,7 +215,7 @@ public class KafkaStreams {
         long begin = time.milliseconds();
         synchronized (stateLock) {
             long elapsedMs = 0L;
-            while (state != State.NOT_RUNNING) {
+            while (state != targetState) {
                 if (waitMs == 0) {
                     try {
                         stateLock.wait();

-- 
To stop receiving notification emails like this one, please contact
guozhang@apache.org.

Mime
View raw message