From d76cde9dcef5b0ffd65c12455dee8f4b26007bca Mon Sep 17 00:00:00 2001 From: yanhuqing Date: Wed, 2 Dec 2020 18:30:09 +0800 Subject: [PATCH] Revert "resume can be executed on other dble nodes (#2361)" This reverts commit 2b8d98c5fa1d49f692a80d711b39b14d864c4d26. --- .../dble/services/manager/response/PauseEnd.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/actiontech/dble/services/manager/response/PauseEnd.java b/src/main/java/com/actiontech/dble/services/manager/response/PauseEnd.java index 343ab827f..690f667e9 100644 --- a/src/main/java/com/actiontech/dble/services/manager/response/PauseEnd.java +++ b/src/main/java/com/actiontech/dble/services/manager/response/PauseEnd.java @@ -7,8 +7,10 @@ package com.actiontech.dble.services.manager.response; import com.actiontech.dble.DbleServer; import com.actiontech.dble.cluster.ClusterHelper; import com.actiontech.dble.cluster.ClusterPathUtil; +import com.actiontech.dble.cluster.values.PauseInfo; import com.actiontech.dble.config.ErrorCode; import com.actiontech.dble.config.model.ClusterConfig; +import com.actiontech.dble.config.model.SystemConfig; import com.actiontech.dble.net.mysql.OkPacket; import com.actiontech.dble.services.manager.ManagerService; import com.actiontech.dble.singleton.PauseShardingNodeManager; @@ -51,6 +53,12 @@ public final class PauseEnd { return; } + PauseInfo pauseInfo = new PauseInfo(value); + if (!pauseInfo.getFrom().equals(SystemConfig.getInstance().getInstanceName())) { + service.writeErrMessage(ErrorCode.ER_UNKNOWN_ERROR, "This node is not the node which start pause"); + return; + } + if (!PauseShardingNodeManager.getInstance().tryResume()) { OK.setMessage(("No shardingNode paused, But still notify cluster").getBytes()); return;