caishunfeng commented on a change in pull request #6621:
URL: https://github.com/apache/dolphinscheduler/pull/6621#discussion_r737960724
##########
File path:
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/registry/WorkerRegistryClient.java
##########
@@ -122,15 +122,20 @@ public void registry() {
* remove registry info
*/
public void unRegistry() {
- String address = getLocalAddress();
- Set<String> workerZkPaths = getWorkerZkPaths();
- for (String workerZkPath : workerZkPaths) {
- registryClient.remove(workerZkPath);
- logger.info("worker node : {} unRegistry from ZK {}.", address,
workerZkPath);
+ try {
+ String address = getLocalAddress();
+ Set<String> workerZkPaths = getWorkerZkPaths();
+ for (String workerZkPath : workerZkPaths) {
+ registryClient.remove(workerZkPath);
+ logger.info("worker node : {} unRegistry from ZK {}.",
address, workerZkPath);
+ }
+ this.heartBeatExecutor.shutdownNow();
+ logger.info("heartbeat executor shutdown");
+ registryClient.close();
+ } catch (Exception ex) {
Review comment:
I think it should catch all exception here, because it is the final
catch for remove registry info. If it juse catch some exception, the problem
will arise again.
--
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]