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:53 UTC
[kafka] branch 1.0 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.0
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/1.0 by this push:
new 078a7ac KAFKA-6731: waitOnState should check the state to be the target start. (#4808)
078a7ac is described below
commit 078a7acff86c7a7b1d97db378e7d98921987329e
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 c527aea..6f3c112 100644
--- a/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
+++ b/streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java
@@ -216,7 +216,7 @@ public class KafkaStreams {
long begin = System.currentTimeMillis();
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.