-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Don't wait for streams thread to be in running state #4908
Conversation
...reams/src/main/java/io/confluent/ksql/execution/streams/materialization/ks/KsStateStore.java
Outdated
Show resolved
Hide resolved
...reams/src/main/java/io/confluent/ksql/execution/streams/materialization/ks/KsStateStore.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes themselves LGTM. approving to unblock.
couple comments on test
@@ -96,43 +82,21 @@ public void shouldThrowNPEs() { | |||
new NullPointerTester() | |||
.setDefault(KafkaStreams.class, kafkaStreams) | |||
.setDefault(LogicalSchema.class, SCHEMA) | |||
.setDefault(Supplier.class, clock) | |||
.setDefault(KsqlConfig.class, ksqlConfig) | |||
.testConstructors(KsStateStore.class, Visibility.PACKAGE); | |||
} | |||
|
|||
@Test | |||
public void shouldAwaitRunning() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix test name?
|
||
// When: | ||
store.store(QueryableStoreTypes.sessionStore()); | ||
} | ||
|
||
@Test | ||
public void shouldGetStoreOnceRunning() { | ||
// Given: | ||
when(kafkaStreams.state()).thenReturn(State.RUNNING); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't understand this change fully
Description
When forwarding to standby is enabled as part of HA, we were still waiting for streams thread to reach running state. I moved the waiting to happen only when forwarding to standby is not enabled.
Testing done
Confirmed it works as expected via experiments on EC2 cluster
Reviewer checklist