-
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 cleanup topics on engine close #4658
Conversation
876a543
to
7c7a222
Compare
public void stop() { | ||
close(false); | ||
} |
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.
I'd be tempted to make this abstract and move this impl to PersistentQuery
.
No biggie, just feels cleaner to me.
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.
I wanted to do that, but there's a place where QueryMetadata
is actually being instantiated directly. Not sure if that's a bug, but I didn't want to deal with it now.
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.
Really? Sounds like a bug!
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.
Looks like this is used from the new API code: for transient queries. So this should default to cleaning up internal topics.
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.
so we should switch this to close(true)
as we want transient queries to delete internal state.
This will also mean we need to remove the overloaded version from TransientQueryMetadata
and add the following overload to PersistentQueryMetadata
@Override
public void stop() {
close(false);
}
de929b1
to
d237f85
Compare
ksql-engine/src/test/java/io/confluent/ksql/engine/KsqlEngineTest.java
Outdated
Show resolved
Hide resolved
ksql-engine/src/test/java/io/confluent/ksql/engine/KsqlEngineTest.java
Outdated
Show resolved
Hide resolved
ksql-engine/src/test/java/io/confluent/ksql/util/QueryMetadataTest.java
Outdated
Show resolved
Hide resolved
ksql-engine/src/test/java/io/confluent/ksql/util/TransientQueryMetadataTest.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.
LGTM!
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
d237f85
to
0b52ace
Compare
7dfb722
to
f52591d
Compare
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
* fix: idempotent terminate that can handle hung streams (#4643) Fixes a couple issues with terminate: - don't throw if the query doesn't get into NOT_RUNNING state. This can happen when streams threads are stuck pending shutdown. - make terminate idempotent * fix: don't cleanup topics on engine close (#4658) Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]> Co-authored-by: Rohan <[email protected]> Co-authored-by: Almog Gavra <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
* fix: idempotent terminate that can handle hung streams (#4643) Fixes a couple issues with terminate: - don't throw if the query doesn't get into NOT_RUNNING state. This can happen when streams threads are stuck pending shutdown. - make terminate idempotent * fix: don't cleanup topics on engine close (#4658) Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]> Co-authored-by: Rohan <[email protected]> Co-authored-by: Almog Gavra <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]> Co-authored-by: Almog Gavra <[email protected]> Co-authored-by: Rohan <[email protected]> Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Rohan [email protected]
fixes #4654
Description
See the description in the ticket above. This makes it so that we don't cleanup topics for persistent queries on closing the engine (but we do for transient).
Testing done
Reviewer checklist