zentol commented on code in PR #22848:
URL: https://github.com/apache/flink/pull/22848#discussion_r1251910850
##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/AbstractHaServices.java:
##########
@@ -161,7 +166,9 @@ public void close() throws Exception {
}
try {
- closeableRegistry.close();
+ if (leaderElectionService != null) {
+ leaderElectionService.close();
+ }
Review Comment:
shouldnt this happen under the lock?
##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/AbstractHaServices.java:
##########
@@ -70,10 +68,15 @@ public abstract class AbstractHaServices implements
HighAvailabilityServices {
private final JobResultStore jobResultStore;
- private final AutoCloseableRegistry closeableRegistry = new
AutoCloseableRegistry();
+ private final MultipleComponentLeaderElectionDriverFactory driverFactory;
+
+ private final Object lock = new Object();
+
+ private DefaultLeaderElectionService leaderElectionService;
Review Comment:
add GuardedBy("lock")?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]