mirror of https://github.com/apache/druid.git
1311e85f65
This commit fixes issues with delayed supervisor termination during certain transient states. Tasks can be created during supervisor termination and left behind since the cleanup may not consider these newly added tasks. #12178 added a lock for the entire process of task creation to prevent such dangling tasks. But it also introduced a deadlock scenario as follows: - An invocation of `runInternal` is in progress. - A `stop` request comes, acquires `stateChangeLock` and submit a `ShutdownNotice` - `runInternal` keeps waiting to acquire the `stateChangeLock` - `ShutdownNotice` remains stuck in the notice queue because `runInternal` is still running - After some timeout, the supervisor goes through a forced termination Fix: * `SeekableStreamSupervisor.runInternal` - do not try to acquire lock if supervisor is already stopping * `SupervisorStateManager.maybeSetState` - do not allow transitions from STOPPING state |
||
---|---|---|
.. | ||
src | ||
pom.xml |