[
https://issues.apache.org/jira/browse/FLINK-4538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15470114#comment-15470114
]
ASF GitHub Bot commented on FLINK-4538:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/2463#discussion_r77787126
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/LeaderIdRegistry.java
---
@@ -15,11 +15,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+package org.apache.flink.runtime.highavailability;
-package org.apache.flink.runtime.resourcemanager;
+import java.util.UUID;
-import java.io.Serializable;
+/**
+ * Registry class to keep track of the current leader ID.
+ */
+public class LeaderIdRegistry {
--- End diff --
The class has some docs but as you can see given my initial question, it's
purpose was not clear to me.
Yes, I actually thought about marking `leaderSessionID` `volatile`.
Given the interface of this class every component which has a reference to
this registry is allowed to change the leader session ID. This can be
problematic because components other than the `ResourceManager` should only be
allowed to retrieve the leader session ID.
I'm actually wondering whether it is not necessary to notify the components
about a new leader session ID. For example, the `SlotManager` should probably
free its registered slots when it loses the leadership. Wouldn't these calls be
suitable to transmit the current leader session ID?
> Implement slot allocation protocol with JobMaster
> -------------------------------------------------
>
> Key: FLINK-4538
> URL: https://issues.apache.org/jira/browse/FLINK-4538
> Project: Flink
> Issue Type: Sub-task
> Components: Cluster Management
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)