debezium / debezium/dbz

Wait in close() method for engine shutdown [DBZ-8733]

Open
#1,219 0 comments 0 reactions 1 assignee Claimed by @vjuranek View on GitHub
component/embedded-engine migrated-from-jira type/task
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-8733](https://issues.redhat.com/browse/DBZ-8733)

When 3rh party application (it can be e.g. Debezium server) calls async engine {{close()}} method, if the engine is already shutting down (typically because exception was thrown), the method immediately throws {{IllegalStateException}} because engine is already shutting down. However, in such case the applications cannot easily determine when engine shut down. The only way seems to be via {{DebeziumEngine.CompletionCallback}}, which is for this particular case little bit cumbersome.
Consider converting {{close()}} method into a blocking call, which would wait for engine to finish the shutdown instead of throwing exception.
Another possibility is to add an easy way how to check the engine state. This would require adding method into Debezium engine API, but this would become handy also in tests.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.