[ 
https://issues.apache.org/jira/browse/FLINK-31816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17740991#comment-17740991
 ] 

Matthias Pohl commented on FLINK-31816:
---------------------------------------

> DefaultLeaderElectionService can be used as a generic implementation. The 
> embedded functionality can be provided through a LeaderElectionDriver 
> implementation.

The initial intention of this Jira issue was to simplify the embedded leader 
election functionality by utilizing the existing 
{{DefaultLeaderElectionService}} and coming up with a specific 
{{LeaderElectionDriver}} implementation. This doesn't work, though: The 
{{DefaultLeaderElectionService}} is implemented in a way that it only allows 
one contender per JVM process. The embedded leader election, in contrast, works 
with multiple contenders living in the same JVM process.

What could be done instead, is to align the {{HighAvailabilityServices}}:
* {{EmbeddedLeaderService}} could implement {{LeaderElectionService}}
* We could introduce {{StandaloneLeaderElectionService}} again that implements 
{{LeaderElectionService}} as well.
* {{HighAvailabilityServices}} could get a single implementation that requires 
a factory method for creating {{JobGraphStore}}, {{JobResultStore}}, 
{{CheckpointRecoveryFactory}}, and {{BlobStore}}. Additionally, it would 
require a {{LeaderElectionService}} (which is essentially a factory for 
{{LeaderElection}} instances).

This would fix FLINK-26630 because we could now easily configure an embedded 
setup with in-memory {{JobGraphStore}}. It would also make the 
{{EmbeddedHaServicesWithLeadershipControl}} obsolete because we could give 
access to the internal {{EmbeddedLeaderService}} instances

> Refactor EmbeddedLeaderElectionService
> --------------------------------------
>
>                 Key: FLINK-31816
>                 URL: https://issues.apache.org/jira/browse/FLINK-31816
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>            Reporter: Matthias Pohl
>            Priority: Major
>
> {{DefaultLeaderElectionService}} can be used as a generic implementation. The 
> embedded functionality can be provided through a {{LeaderElectionDriver}} 
> implementation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to