Cleanup abandoned state stores on startup #7720
Labels
bug
fix-it-week
operability
Issues pertaining to running and operating KSQL, notably in production
query-engine
Issues owned by the ksqlDB Query Engine team
Describe the bug
When queries are terminated, we attempt to call
kafkastreams.close(timeout)
and if we hit the timeout, we skip cleaning up the streams state viakafkastreams.cleanup()
. This was added in #7717 since calling cleanup anyway resulted in an exception. If the query has been terminated, then on startup, when we know the query is no longer running, the state should be cleaned up.To Reproduce
Requires significantly stressing the server so that it misses the the timeout in
kafkastreams.close(timeout)
. This has happened when running tests on CI.Expected behavior
State must be kept so that on startup, we know which state stores we can clean up. Might want to use a similar mechanism as was used for #4009, which was a local file of things to check up on implemented here: #6714
Actual behaviour
No cleanups.
The text was updated successfully, but these errors were encountered: