forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-12595][kinesis] Interrupt thread at right time to avoid deadlock
- Inside testOriginalExceptionIsPreservedWhenInterruptedDuringShutdown, consumerThread.interrupt() was getting absorbed inside KinesisDataFetcher's while(running) loop, therefore TestableKinesisDataFetcherForShardConsumerException's awaitTermination() wasn't getting interrupted by it. This led to deadlock, with KinesisDataFetcher waiting on the test code to send the interrupt, and the test code waiting for KinesisDataFetcher to throw the expected exception. - Now, the test code waits until KinesisDataFetcher is inside awaitTermination() before producing the interrupt, so it can be sure that the interrupt it produces will be received/handled inside awaitTermination().
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 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