mxq-151 commented on code in PR #13404:
URL:
https://github.com/apache/dolphinscheduler/pull/13404#discussion_r1089660854
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -235,12 +235,13 @@ public void notify(Event event) {
}
private void updateMasterNodes() {
- currentSlot = 0;
- totalSlot = 0;
- this.masterNodes.clear();
+
String nodeLock = Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_MASTERS;
try {
registryClient.getLock(nodeLock);
+ currentSlot = 0;
Review Comment:
> It's better to store the pre value of `currentSlot`, totalSlot,
masterNodes, and rollback to the pre value when catch an exception.
for what reason?
--
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]