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;