Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a race between internal panic and shutdown in DynamicTaskExecutor
Race could be observed as a call to DynamicTaskExecutor#shutdown(true) hanging forever occasionally if there was a concurrent, already submitted task, failing where the failing task would also like to shut down. This would be a problem if there was only one processor currently, or rather if all current processors failed at the same time. This would prevent the original exception from propagating out to user. Added a check in shutdown for a panic, which now can only be set by a processor observing a failing task. The shutdown call would then exit prematurely. For what TaskExecutor is used for, in import tool, this behaviour is fine because the original exception will be thrown anyway by means of the StageControl "panic propagation". To further alleviate this problem ExecutorServiceStep was changed to pass in false (i.e. don't wait for tasks to complete) in the event of panic.
- Loading branch information
Showing
5 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters