elphastori commented on code in PR #22308:
URL: https://github.com/apache/flink/pull/22308#discussion_r1156594224
##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/nonha/standalone/StandaloneHaServices.java:
##########
@@ -134,9 +136,13 @@ public LeaderElectionService
getJobManagerLeaderElectionService(JobID jobID) {
}
@Override
- public LeaderRetrievalService getClusterRestEndpointLeaderRetriever() {
+ public LeaderRetrievalService getClusterRestEndpointLeaderRetriever()
+ throws UnknownHostException {
synchronized (lock) {
checkNotShutdown();
+ String clusterRestEndpointAddress =
+ HighAvailabilityServicesUtils.getWebMonitorAddress(
+ configuration,
AddressResolution.NO_ADDRESS_RESOLUTION);
Review Comment:
Why have you moved the call to `getWebMonitorAddress` inside this method? Is
it to have it after `checkNotShutdown()` or to have it in a synchronized block?
Having the check in a lock may result reduced performance and there may be
no need for thread safety since it's only a read operation.
--
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]