EMsnap commented on code in PR #3522:
URL: https://github.com/apache/incubator-inlong/pull/3522#discussion_r843435542
##########
inlong-tubemq/tubemq-manager/src/main/java/org/apache/inlong/tubemq/manager/service/MasterServiceImpl.java:
##########
@@ -174,8 +184,10 @@ public TubeMQResult checkMasterNodeStatus(String masterIp,
Integer masterWebPort
@Override
public String getQueryCountUrl(Integer clusterId, String method) {
- MasterEntry masterEntry =
- masterRepository.findMasterEntryByClusterIdEquals(clusterId);
+ List<MasterEntry> masterEntries =
+ masterRepository.findMasterEntriesByClusterIdEquals(clusterId);
+ int index = (int)(Math.random() * masterEntries.size());
+ MasterEntry masterEntry = masterEntries.get(index);
Review Comment:
just use getMasterNode in masterServiceImpl to get active master
--
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]