You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2018/04/02 17:43:35 UTC
[kafka] branch 1.1 updated: KAFKA-6731: waitOnState should check
the state to be the target start. (#4808)
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 <hu...@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 <wa...@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.