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/22 14:57:42 UTC

[GitHub] [dolphinscheduler] github-code-scanning[bot] commented on a diff in pull request #12050: [fix#12000]Cannot remove the WorkerGroup from the master service

github-code-scanning[bot] commented on code in PR #12050:
URL: https://github.com/apache/dolphinscheduler/pull/12050#discussion_r977765178


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.java:
##########
@@ -331,15 +353,68 @@
                 MASTER_SIZE = nodes.size();
                 MASTER_SLOT = index;
             } else {
-                logger.warn("current addr:{} is not in active master list", masterConfig.getMasterAddress());
-            }
-            logger.info("update master nodes, master size: {}, slot: {}, addr: {}", MASTER_SIZE, MASTER_SLOT,
+                logger.warn("current addr:{} is not in active master list",
                     masterConfig.getMasterAddress());
+            }
+            logger.info("update master nodes, master size: {}, slot: {}, addr: {}", MASTER_SIZE,
+                MASTER_SLOT, masterConfig.getMasterAddress());
         } finally {
             masterLock.unlock();
         }
     }
 
+    /**
+     * sync worker group nodes from registry center
+     *
+     * @param workerGroup worker group
+     * @param nodes worker nodes
+     * @param type event type
+     */
+    private void syncWorkerGroupNodesFromRegistry(String workerGroup, Collection<String> nodes,
+        Type type) {
+        registryWorkerGroupWriteLock.lock();
+        try {
+            if (type == Type.REMOVE) {
+                if (!registryWorkerGroupNodes.contains(workerGroup)) {

Review Comment:
   ## Type mismatch on container access
   
   Actual argument type 'String' is incompatible with expected argument type 'Set'.
   
   [Show more details](https://github.com/apache/dolphinscheduler/security/code-scanning/1534)



-- 
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