Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-8733

Wait in close() method for engine shutdown

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • 3.1-plan
    • 3.1.0.Alpha2
    • embedded-engine
    • None
    • False
    • None
    • False

      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.

              vjuranek@redhat.com Vojtech Juranek
              vjuranek@redhat.com Vojtech Juranek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: