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-29234] JobMasterServiceLeadershipRunner#closeAsync has a lock …
…with an excessive range Currently, in JobMasterServiceLeadershipRunner, Leader event callback such as grantLeadership and revokeLeadership will be invoked with nested lock(e.g. curator's event lock and DefaultLeaderElectionService's lock) and try to acquire JobMasterServiceLeadershipRunner's own lock. This will lead to many deadlock risks, such as the simultaneous close and grantLeadership. To avoid this, we narrow the range of lock within JobMasterServiceLeadershipRunner#closeAsync. In the future, we'd better take some measures to avoid possible deadlocks. For example, the leaderEvent of the leaderElectionService is executed by a separate thread. This closes apache#21137
- Loading branch information
1 parent
269ba49
commit d745f5b
Showing
3 changed files
with
269 additions
and
116 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
Oops, something went wrong.