Github user zhangminglei commented on a diff in the pull request:
https://github.com/apache/flink/pull/6154#discussion_r194938580
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/embedded/EmbeddedLeaderService.java
---
@@ -356,8 +357,8 @@ public void confirmLeaderSessionID(UUID
leaderSessionID) {
}
@Override
- public boolean hasLeadership() {
- return isLeader;
+ public boolean hasLeadership(@Nonnull UUID leaderSessionId) {
+ return isLeader &&
leaderSessionId.equals(currentLeaderSessionId);
}
--- End diff --
I would ask, in what situation, the ```leaderSessionId``` does not equal to
```currentLeaderSessionId``` . When another task update the value ?
---