-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
Currently there is a race condition edge case in AsyncEmbeddedEngine. when using the taskStarted callback to judge when the engine is running, it is still possible to close the engine and run into an illegalStateException:
1) our code calls engine.run()
2) debezium runs startSourceTask on line 216
3) startSourceTasks completes successfully, returning the connector callback and our connector startup method completes
4) our code calls engine.close() before debezium has a chance to change the state to POLLING_TASKS on line 219
5) we hit an illegalStateException Cannot stop engine while tasks are starting...
Implementation ideas (optional)
having a seperate pollingTasks connector callback would be nice. currently there is not true connector callback that acts as a "green light" that engine.close() can be called safely.
more discussion in zulip thread here: #community-oracle > AsyncEmbeddedEngine connectorCallback illegalStateException