You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/23 09:32:36 UTC

[GitHub] [dolphinscheduler] ruanwenjun commented on a diff in pull request #12050: [fix#12000]Cannot remove the WorkerGroup from the master service

ruanwenjun commented on code in PR #12050:
URL: https://github.com/apache/dolphinscheduler/pull/12050#discussion_r978446024


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -81,11 +82,29 @@ public class ServerNodeManager implements InitializingBean {
     private final ReentrantReadWriteLock.ReadLock workerNodeInfoReadLock = workerNodeInfoLock.readLock();
     private final ReentrantReadWriteLock.WriteLock workerNodeInfoWriteLock = workerNodeInfoLock.writeLock();
 
+    private final ReentrantReadWriteLock registryWorkerGroupLock = new ReentrantReadWriteLock();
+    private final ReentrantReadWriteLock.ReadLock registryWorkerGroupReadLock = registryWorkerGroupLock.readLock();
+    private final ReentrantReadWriteLock.WriteLock registryWorkerGroupWriteLock = registryWorkerGroupLock.writeLock();
+
+    private final ReentrantReadWriteLock dbWorkerGroupLock = new ReentrantReadWriteLock();
+    private final ReentrantReadWriteLock.ReadLock dbWorkerGroupReadLock = dbWorkerGroupLock.readLock();
+    private final ReentrantReadWriteLock.WriteLock dbWorkerGroupWriteLock = dbWorkerGroupLock.writeLock();

Review Comment:
   I don' t think we need to add these locks and the `registryWorkerGroupNodes`, `dbWorkerGroupNodes` these two map.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org