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

Race condition in EmbeddedEngine shutdown

    XMLWordPrintable

    Details

      Description

      When the EmbeddedEngine.stop() method is called it

      • nulls runningThread
      • interrupts it

      The running thread can be stopped in two cases

      • runningThread is null
      • interrupt

      When the main loop detects the null first it executes task.stop(), which calls ChangeEventSourceCoordinator.stop(). THis method clear interrupted flag and terminates executor threads. But with unfrotunate timing it can happen
      *runningThread is set null

      • ChangeEventSourceCoordinator.stop() is called that clears the interrupt flag
      • EmbeddedEngine.stop() interrupts the thread
      • awaitTermination ends in InterruptedException

        Attachments

          Activity

            People

            Assignee:
            gunnar.morling Gunnar Morling
            Reporter:
            jpechanec Jiri Pechanec
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: