ruanwenjun commented on code in PR #15461:
URL:
https://github.com/apache/dolphinscheduler/pull/15461#discussion_r1451743293
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -234,14 +234,14 @@ private void updateMasterNodes() {
}
private void updateWorkerNodes() {
- workerGroupWriteLock.lock();
Review Comment:
Yes, the logic in ServerNodeManager is complex, some lock is not needed.
It's better to split the ServerNodeManager into `MasterInstanceManager`,
`WorkerInstanceManager`.
And the lock here is not needed, we don't need to use a lock here, each
refresh we directly replace the whole map in memory is enough, right now we use
read/write lock is overdesign.
--
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]