[
https://issues.apache.org/jira/browse/FLINK-31838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Matthias Pohl resolved FLINK-31838.
-----------------------------------
Fix Version/s: 1.18.0
Resolution: Fixed
master:
* b814c369256f011f18fc7283d60cd4a27593d988
with depending hotfix commits:
* ed195cfedbbcee45b9eee33b054a209b20f09b39
* 1d208f13d8954c68a10c1b380b3b0dfd00921f63
* 43688339721176c8b8070fb19ac1dcda990f9017
> Move thread handling from DefaultMultipleComponentLeaderElectionService into
> DefaultLeaderElectionService
> ---------------------------------------------------------------------------------------------------------
>
> Key: FLINK-31838
> URL: https://issues.apache.org/jira/browse/FLINK-31838
> Project: Flink
> Issue Type: Sub-task
> Reporter: Matthias Pohl
> Assignee: Matthias Pohl
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.18.0
>
>
> While working on FLINK-31773 we noticed in the PR (see [comment
> #1|https://github.com/apache/flink/pull/22380#discussion_r1168724716] and
> [comment
> #2|https://github.com/apache/flink/pull/22380#discussion_r1168771139]) that
> there's a different notion of responsibility of the thread handling between
> the FLINK-24038 and the pre-FLINK-24038 implementation of the leader
> election. The latter one (i.e.
> {{{}DefaultLeaderElectionService{}}}) doesn't need to deal with where
> {{onGrantLeadership}} and {{onRevokeLeadership}} are called because those are
> called in a separate thread in the driver. The new implementation (i.e.
> {{{}DefaultMultipleComponentLeaderElectionService{}}}) has to call the
> {{onGrantLeadership}} and {{onRevokeLeadership}} methods itself when
> registering new contenders. This would happen in the main thread of the
> {{LeaderContender}} which is not suitable.
> {{DefaultMultipleComponentLeaderElectionService}} solves this by introducing
> its own threadpool.
> The separation of driver and contender in FLINK-31773 requires such a
> executionService in {{DefaultLeaderElectionService}} as well before going
> ahead with FLINK-31773.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)