This is an automated email from the ASF dual-hosted git repository.

sunnianjun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new b47e6a8ef77 Rename processlist id to process id (#25415)
b47e6a8ef77 is described below

commit b47e6a8ef7750cfbb36087580339967397ff875b
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Apr 29 23:36:30 2023 +0800

    Rename processlist id to process id (#25415)
---
 RELEASE-NOTES.md                                   |  2 +-
 ...,_Bringing_New_Cloud_Native_Possibilities.en.md |  2 +-
 ...42\200\231s_Show_processlist_&_Kill_Work.en.md" | 32 +++++++--------
 .../content/reference/management/_index.cn.md      |  2 +-
 .../content/reference/management/_index.en.md      |  2 +-
 .../metadata/persist/node/ComputeNode.java         | 14 +++----
 .../metadata/persist/node/ProcessNode.java         | 14 +++----
 .../subscriber/ProcessRegistrySubscriber.java      | 46 +++++++++++-----------
 ...nt.java => KillProcessIdUnitCompleteEvent.java} |  6 +--
 .../event/ShowProcessListUnitCompleteEvent.java    |  2 +-
 .../watcher/ComputeNodeStateChangedWatcher.java    | 12 +++---
 .../subscriber/ProcessListChangedSubscriber.java   | 12 +++---
 .../registry/process/node/ProcessNodeTest.java     |  4 +-
 .../ProcessListChangedSubscriberTest.java          | 14 +++----
 .../admin/executor/KillProcessExecutor.java        |  4 +-
 .../statement/type/MySQLDALStatementVisitor.java   |  2 +-
 .../statement/mysql/dal/MySQLKillStatement.java    |  2 +-
 .../statement/dal/impl/KillStatementAssert.java    |  2 +-
 18 files changed, 86 insertions(+), 88 deletions(-)

diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index abfeac3adf4..04a63aeff0e 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -278,7 +278,7 @@
 ### New Feature
 
 1. Support SQL audit for sharding feature
-1. Support MySQL show processlist and kill process list id feature
+1. Support MySQL show processlist and kill process id feature
 1. Scaling: Add dedicated DistSQL for data migration
 1. Scaling: Basic support migrate data to heterogeneous database
 1. DistSQL: New syntax `CREATE MIGRATION PROCESS CONFIGURATION`
diff --git 
a/docs/blog/content/material/2022_09_08_Apache_ShardingSphere_5.2.0_is_Released,_Bringing_New_Cloud_Native_Possibilities.en.md
 
b/docs/blog/content/material/2022_09_08_Apache_ShardingSphere_5.2.0_is_Released,_Bringing_New_Cloud_Native_Possibilities.en.md
index 79bfa7daf22..b435b7c8675 100644
--- 
a/docs/blog/content/material/2022_09_08_Apache_ShardingSphere_5.2.0_is_Released,_Bringing_New_Cloud_Native_Possibilities.en.md
+++ 
b/docs/blog/content/material/2022_09_08_Apache_ShardingSphere_5.2.0_is_Released,_Bringing_New_Cloud_Native_Possibilities.en.md
@@ -134,7 +134,7 @@ Below are all the update logs of ShardingSphere 5.2.0. To 
deliver a better user
 
 - Kernel: Support SQL audit for sharding feature
 
-- Kernel: Support MySQL show processlist and kill process list id feature
+- Kernel: Support MySQL show processlist and kill process id feature
 
 - Scaling: Add dedicated DistSQL for data migration
 
diff --git 
"a/docs/blog/content/material/2022_09_22_How_does_ShardingSphere\342\200\231s_Show_processlist_&_Kill_Work.en.md"
 
"b/docs/blog/content/material/2022_09_22_How_does_ShardingSphere\342\200\231s_Show_processlist_&_Kill_Work.en.md"
index b96732fa25f..25a791bb0ca 100644
--- 
"a/docs/blog/content/material/2022_09_22_How_does_ShardingSphere\342\200\231s_Show_processlist_&_Kill_Work.en.md"
+++ 
"b/docs/blog/content/material/2022_09_22_How_does_ShardingSphere\342\200\231s_Show_processlist_&_Kill_Work.en.md"
@@ -217,20 +217,20 @@ This method is the core to implementing `Show 
processlist`. Next, we'll introduc
 public final class ProcessRegistrySubscriber {    
     @Subscribe
     public void loadShowProcessListData(final ShowProcessListRequestEvent 
event) {
-        String processListId = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
+        String processId = new UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
         boolean triggerIsComplete = false;
         // 1. Obtain the Process List path of all existing proxy nodes in 
cluster mode
-        Collection<String> triggerPaths = getTriggerPaths(processListId);
+        Collection<String> triggerPaths = getTriggerPaths(processId);
         try {
             // 2. Iterate through the path and write an empty string to the 
node, to trigger the node monitoring.
             triggerPaths.forEach(each -> repository.persist(each, ""));
             // 3. Lock and wait 5 seconds for each node to write the 
information of currently running SQL to the persistence layer. 
-            triggerIsComplete = waitAllNodeDataReady(processListId, 
triggerPaths);
+            triggerIsComplete = waitAllNodeDataReady(processId, triggerPaths);
             // 4. Fetch and aggregate the data written by each proxy node from 
the persistence layer. Then EventBus will post a ShowProcessListResponseEvent 
command, which means the operation is completed.
-            sendShowProcessList(processListId);
+            sendShowProcessList(processId);
         } finally {
             // 5. Delete resources
-            repository.delete(ProcessNode.getProcessListIdPath(processListId));
+            repository.delete(ProcessNode.getProcessIdPath(processId));
             if (!triggerIsComplete) {
                 triggerPaths.forEach(repository::delete);
             }
@@ -243,7 +243,7 @@ It contains five steps and steps 2 & 3 are the focus.
 
 ### 2.2.1 Step 2: the cluster obtains the data implementation
 
-In this step, an empty string will be written to the node 
`/nodes/compute_nodes/process_trigger/<instanceId>:<processlistId>`, which will 
trigger ShardingSphere's monitoring logic.
+In this step, an empty string will be written to the node 
`/nodes/compute_nodes/process_trigger/<instanceId>:<processId>`, which will 
trigger ShardingSphere's monitoring logic.
 
 When ShardingSphere is started, the persistence layer will `watch` to monitor 
a series of path changes, such as the addition, deletion, and modification 
operations of the path `/nodes/compute_nodes`.
 
@@ -275,9 +275,9 @@ public final class ComputeNodeStateChangedWatcher 
implements GovernanceWatcher<G
             // show processlist
         } else if 
(event.getKey().startsWith(ComputeNode.getProcessTriggerNodePatch())) {
             return createShowProcessListTriggerEvent(event);
-            // kill processlistId
+            // kill processId
         } else if 
(event.getKey().startsWith(ComputeNode.getProcessKillNodePatch())) {
-            return createKillProcessListIdEvent(event);
+            return createKillProcessIdEvent(event);
         }
         return Optional.empty();
     }
@@ -313,15 +313,15 @@ public final class ClusterContextManagerCoordinator {    
@Subscribe
         }
         Collection<ExecuteProcessContext> processContexts = 
ShowProcessListManager.getInstance().getAllProcessContext();
         if (!processContexts.isEmpty()) {
-            
registryCenter.getRepository().persist(ProcessNode.getProcessListInstancePath(event.getProcessListId(),
 event.getInstanceId()),
+            
registryCenter.getRepository().persist(ProcessNode.getProcessListInstancePath(event.getProcessId(),
 event.getInstanceId()),
                     YamlEngine.marshal(new 
BatchYamlExecuteProcessContext(processContexts)));
         }
-        
registryCenter.getRepository().delete(ComputeNode.getProcessTriggerInstanceIdNodePath(event.getInstanceId(),
 event.getProcessListId()));
+        
registryCenter.getRepository().delete(ComputeNode.getProcessTriggerInstanceIdNodePath(event.getInstanceId(),
 event.getProcessId()));
     }
 }
 ```
 
-`ClusterContextManagerCoordinator#triggerShowProcessList` will subscribe to 
`ShowProcessListTriggerEvent`, in which `processContext` data is processed by 
itself. `ShowProcessListManager.getInstance().getAllProcessContext()` retrieves 
the `processContext` that is currently running (here the data refers to the SQL 
information that ShardingSphere stores in the Map before each SQL execution, 
which is described at the beginning of the article) and transfers it to the 
persistence layer. If the [...]
+`ClusterContextManagerCoordinator#triggerShowProcessList` will subscribe to 
`ShowProcessListTriggerEvent`, in which `processContext` data is processed by 
itself. `ShowProcessListManager.getInstance().getAllProcessContext()` retrieves 
the `processContext` that is currently running (here the data refers to the SQL 
information that ShardingSphere stores in the Map before each SQL execution, 
which is described at the beginning of the article) and transfers it to the 
persistence layer. If the [...]
 
 When you delete the node, monitoring will also be triggered and 
`ShowProcessListUnitCompleteEvent` will be posted. This event will finally 
awake the pending lock.
 
@@ -330,7 +330,7 @@ public final class ClusterContextManagerCoordinator {
     
     @Subscribe
     public synchronized void completeUnitShowProcessList(final 
ShowProcessListUnitCompleteEvent event) {
-        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessListId());
+        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessId());
         if (null != simpleLock) {
             simpleLock.doNotify();
         }
@@ -349,7 +349,7 @@ public final class ClusterContextManagerCoordinator {
     
     @Subscribe
     public synchronized void completeUnitShowProcessList(final 
ShowProcessListUnitCompleteEvent event) {
-        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessListId());
+        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessId());
         if (null != simpleLock) {
             simpleLock.doNotify();
         }
@@ -364,11 +364,11 @@ After each instance processed the data, the instance that 
received the `Show pro
 ```java
 public final class ProcessRegistrySubscriber {  
     
-    private void sendShowProcessList(final String processListId) {
-        List<String> childrenKeys = 
repository.getChildrenKeys(ProcessNode.getProcessListIdPath(processListId));
+    private void sendShowProcessList(final String processId) {
+        List<String> childrenKeys = 
repository.getChildrenKeys(ProcessNode.getProcessIdPath(processId));
         Collection<String> batchProcessContexts = new LinkedList<>();
         for (String each : childrenKeys) {
-            
batchProcessContexts.add(repository.get(ProcessNode.getProcessListInstancePath(processListId,
 each)));
+            
batchProcessContexts.add(repository.get(ProcessNode.getProcessListInstancePath(processId,
 each)));
         }
         eventBusContext.post(new 
ShowProcessListResponseEvent(batchProcessContexts));
     }
diff --git a/docs/document/content/reference/management/_index.cn.md 
b/docs/document/content/reference/management/_index.cn.md
index 6074ed33fc6..bd626b99516 100644
--- a/docs/document/content/reference/management/_index.cn.md
+++ b/docs/document/content/reference/management/_index.cn.md
@@ -48,7 +48,7 @@ namespace
    ├    ├     ├     ├──UUID
    ├    ├     ├     ├──....
    ├    ├     ├──process_trigger
-   ├    ├     ├     ├──process_list_id:UUID
+   ├    ├     ├     ├──process_id:UUID
    ├    ├     ├     ├──....
    ├    ├     ├──labels                      
    ├    ├     ├     ├──UUID
diff --git a/docs/document/content/reference/management/_index.en.md 
b/docs/document/content/reference/management/_index.en.md
index d80972414dc..ac6c452894d 100644
--- a/docs/document/content/reference/management/_index.en.md
+++ b/docs/document/content/reference/management/_index.en.md
@@ -48,7 +48,7 @@ namespace
    ├    ├     ├     ├──UUID
    ├    ├     ├     ├──....
    ├    ├     ├──process_trigger
-   ├    ├     ├     ├──process_list_id:UUID
+   ├    ├     ├     ├──process_id:UUID
    ├    ├     ├     ├──....
    ├    ├     ├──labels                      
    ├    ├     ├     ├──UUID
diff --git 
a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ComputeNode.java
 
b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ComputeNode.java
index c0a3be28115..0636b850d0e 100644
--- 
a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ComputeNode.java
+++ 
b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ComputeNode.java
@@ -95,25 +95,25 @@ public final class ComputeNode {
     }
     
     /**
-     * Get process trigger instance process list id node path.
+     * Get process trigger instance process id node path.
      *
      * @param instanceId instance id
-     * @param processListId process list id
+     * @param processId process id
      * @return path of process trigger instance node path
      */
-    public static String getProcessTriggerInstanceIdNodePath(final String 
instanceId, final String processListId) {
-        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_TRIGGER, 
String.join(":", instanceId, processListId));
+    public static String getProcessTriggerInstanceIdNodePath(final String 
instanceId, final String processId) {
+        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_TRIGGER, 
String.join(":", instanceId, processId));
     }
     
     /**
      * Get process kill instance id node path.
      *
      * @param instanceId instance id
-     * @param processListId process list id
+     * @param processId process id
      * @return path of process kill instance id node path
      */
-    public static String getProcessKillInstanceIdNodePath(final String 
instanceId, final String processListId) {
-        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_KILL, 
String.join(":", instanceId, processListId));
+    public static String getProcessKillInstanceIdNodePath(final String 
instanceId, final String processId) {
+        return String.join("/", "", ROOT_NODE, COMPUTE_NODE, PROCESS_KILL, 
String.join(":", instanceId, processId));
     }
     
     /**
diff --git 
a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ProcessNode.java
 
b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ProcessNode.java
index 44edf96f025..90aa13e36e5 100644
--- 
a/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ProcessNode.java
+++ 
b/kernel/metadata/core/src/main/java/org/apache/shardingsphere/metadata/persist/node/ProcessNode.java
@@ -29,23 +29,23 @@ public final class ProcessNode {
     private static final String EXECUTION_NODES = "execution_nodes";
     
     /**
-     * Get process list id path.
+     * Get process id path.
      *
-     * @param processListId process list id
+     * @param processId process id
      * @return execution path
      */
-    public static String getProcessListIdPath(final String processListId) {
-        return String.join("/", "", EXECUTION_NODES, processListId);
+    public static String getProcessIdPath(final String processId) {
+        return String.join("/", "", EXECUTION_NODES, processId);
     }
     
     /**
      * Get process list instance path.
      *
-     * @param processListId process list id
+     * @param processId process id
      * @param instancePath instance path
      * @return execution path
      */
-    public static String getProcessListInstancePath(final String 
processListId, final String instancePath) {
-        return String.join("/", "", EXECUTION_NODES, processListId, 
instancePath);
+    public static String getProcessListInstancePath(final String processId, 
final String instancePath) {
+        return String.join("/", "", EXECUTION_NODES, processId, instancePath);
     }
 }
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriber.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriber.java
index 4194dd7f495..10205b424d3 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriber.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ProcessRegistrySubscriber.java
@@ -60,67 +60,65 @@ public final class ProcessRegistrySubscriber {
      */
     @Subscribe
     public void loadShowProcessListData(final ShowProcessListRequestEvent 
event) {
-        String processListId = new 
UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
+        String processId = new UUID(ThreadLocalRandom.current().nextLong(), 
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
         boolean triggerIsComplete = false;
-        Collection<String> triggerPaths = getTriggerPaths(processListId);
+        Collection<String> triggerPaths = getTriggerPaths(processId);
         try {
             triggerPaths.forEach(each -> repository.persist(each, ""));
-            triggerIsComplete = waitAllNodeDataReady(processListId, 
triggerPaths);
-            sendShowProcessList(processListId);
+            triggerIsComplete = waitAllNodeDataReady(processId, triggerPaths);
+            sendShowProcessList(processId);
         } finally {
-            repository.delete(ProcessNode.getProcessListIdPath(processListId));
+            repository.delete(ProcessNode.getProcessIdPath(processId));
             if (!triggerIsComplete) {
                 triggerPaths.forEach(repository::delete);
             }
         }
     }
     
-    private Collection<String> getTriggerPaths(final String processListId) {
+    private Collection<String> getTriggerPaths(final String processId) {
         return Stream.of(InstanceType.values())
-                .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream()
-                        .map(onlinePath -> 
ComputeNode.getProcessTriggerInstanceIdNodePath(onlinePath, processListId)))
+                .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream().map(onlinePath
 -> ComputeNode.getProcessTriggerInstanceIdNodePath(onlinePath, processId)))
                 .collect(Collectors.toList());
     }
     
-    private void sendShowProcessList(final String showProcessListId) {
-        List<String> childrenKeys = 
repository.getChildrenKeys(ProcessNode.getProcessListIdPath(showProcessListId));
+    private void sendShowProcessList(final String processId) {
+        List<String> childrenKeys = 
repository.getChildrenKeys(ProcessNode.getProcessIdPath(processId));
         Collection<String> batchProcessContexts = new LinkedList<>();
         for (String each : childrenKeys) {
-            
batchProcessContexts.add(repository.getDirectly(ProcessNode.getProcessListInstancePath(showProcessListId,
 each)));
+            
batchProcessContexts.add(repository.getDirectly(ProcessNode.getProcessListInstancePath(processId,
 each)));
         }
         eventBusContext.post(new 
ShowProcessListResponseEvent(batchProcessContexts));
     }
     
     /**
-     * Kill process list id.
+     * Kill process id.
      *
      * @param event get children request event.
      */
     @Subscribe
-    public void killProcessListId(final KillProcessIdRequestEvent event) {
-        String processListId = event.getProcessId();
-        boolean killProcessListIdIsComplete = false;
-        Collection<String> processKillPaths = 
getProcessKillPaths(processListId);
+    public void killProcessId(final KillProcessIdRequestEvent event) {
+        String processId = event.getProcessId();
+        boolean killProcessIdIsComplete = false;
+        Collection<String> processKillPaths = getProcessKillPaths(processId);
         try {
             processKillPaths.forEach(each -> repository.persist(each, ""));
-            killProcessListIdIsComplete = waitAllNodeDataReady(processListId, 
processKillPaths);
+            killProcessIdIsComplete = waitAllNodeDataReady(processId, 
processKillPaths);
         } finally {
-            if (!killProcessListIdIsComplete) {
+            if (!killProcessIdIsComplete) {
                 processKillPaths.forEach(repository::delete);
             }
         }
     }
     
-    private Collection<String> getProcessKillPaths(final String processListId) 
{
+    private Collection<String> getProcessKillPaths(final String processId) {
         return Stream.of(InstanceType.values())
-                .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream()
-                        .map(onlinePath -> 
ComputeNode.getProcessKillInstanceIdNodePath(onlinePath, processListId)))
+                .flatMap(each -> 
repository.getChildrenKeys(ComputeNode.getOnlineNodePath(each)).stream().map(onlinePath
 -> ComputeNode.getProcessKillInstanceIdNodePath(onlinePath, processId)))
                 .collect(Collectors.toList());
     }
     
-    private boolean waitAllNodeDataReady(final String processListId, final 
Collection<String> paths) {
+    private boolean waitAllNodeDataReady(final String processId, final 
Collection<String> paths) {
         ShowProcessListSimpleLock simpleLock = new ShowProcessListSimpleLock();
-        ShowProcessListManager.getInstance().getLocks().put(processListId, 
simpleLock);
+        ShowProcessListManager.getInstance().getLocks().put(processId, 
simpleLock);
         simpleLock.lock();
         try {
             while (!isReady(paths)) {
@@ -131,7 +129,7 @@ public final class ProcessRegistrySubscriber {
             return true;
         } finally {
             simpleLock.unlock();
-            
ShowProcessListManager.getInstance().getLocks().remove(processListId);
+            ShowProcessListManager.getInstance().getLocks().remove(processId);
         }
     }
     
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessListIdUnitCompleteEvent.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
similarity index 86%
rename from 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessListIdUnitCompleteEvent.java
rename to 
mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
index a53032f5183..5bb052e1dc3 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessListIdUnitCompleteEvent.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/KillProcessIdUnitCompleteEvent.java
@@ -22,11 +22,11 @@ import lombok.RequiredArgsConstructor;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.GovernanceEvent;
 
 /**
- * Kill process list id unit complete event.
+ * Kill process id unit complete event.
  */
 @RequiredArgsConstructor
 @Getter
-public final class KillProcessListIdUnitCompleteEvent implements 
GovernanceEvent {
+public final class KillProcessIdUnitCompleteEvent implements GovernanceEvent {
     
-    private final String processListId;
+    private final String processId;
 }
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/ShowProcessListUnitCompleteEvent.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/ShowProcessListUnitCompleteEvent.java
index ecb6c3e4bf7..7d8839de79d 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/ShowProcessListUnitCompleteEvent.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/event/ShowProcessListUnitCompleteEvent.java
@@ -28,5 +28,5 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.Gover
 @Getter
 public final class ShowProcessListUnitCompleteEvent implements GovernanceEvent 
{
     
-    private final String processListId;
+    private final String processId;
 }
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
index fef25662c9e..71d007e61f5 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/compute/watcher/ComputeNodeStateChangedWatcher.java
@@ -28,7 +28,7 @@ import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.Gover
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOfflineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.InstanceOnlineEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessListIdUnitCompleteEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdUnitCompleteEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.LabelsEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListTriggerEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListUnitCompleteEvent;
@@ -83,7 +83,7 @@ public final class ComputeNodeStateChangedWatcher implements 
GovernanceWatcher<G
             return createShowProcessListTriggerEvent(event);
         }
         if (event.getKey().startsWith(ComputeNode.getProcessKillNodePatch())) {
-            return createKillProcessListIdEvent(event);
+            return createKillProcessIdEvent(event);
         }
         return Optional.empty();
     }
@@ -126,8 +126,8 @@ public final class ComputeNodeStateChangedWatcher 
implements GovernanceWatcher<G
         return Pattern.compile(ComputeNode.getProcessTriggerNodePatch() + 
"/([\\S]+):([\\S]+)$", Pattern.CASE_INSENSITIVE).matcher(event.getKey());
     }
     
-    private Optional<GovernanceEvent> createKillProcessListIdEvent(final 
DataChangedEvent event) {
-        Matcher matcher = getKillProcessListIdMatcher(event);
+    private Optional<GovernanceEvent> createKillProcessIdEvent(final 
DataChangedEvent event) {
+        Matcher matcher = getKillProcessIdMatcher(event);
         if (!matcher.find()) {
             return Optional.empty();
         }
@@ -135,12 +135,12 @@ public final class ComputeNodeStateChangedWatcher 
implements GovernanceWatcher<G
             return Optional.of(new KillProcessIdEvent(matcher.group(1), 
matcher.group(2)));
         }
         if (Type.DELETED == event.getType()) {
-            return Optional.of(new 
KillProcessListIdUnitCompleteEvent(matcher.group(2)));
+            return Optional.of(new 
KillProcessIdUnitCompleteEvent(matcher.group(2)));
         }
         return Optional.empty();
     }
     
-    private static Matcher getKillProcessListIdMatcher(final DataChangedEvent 
event) {
+    private static Matcher getKillProcessIdMatcher(final DataChangedEvent 
event) {
         Pattern pattern = 
Pattern.compile(ComputeNode.getProcessKillNodePatch() + "/([\\S]+):([\\S]+)$", 
Pattern.CASE_INSENSITIVE);
         return pattern.matcher(event.getKey());
     }
diff --git 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriber.java
 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriber.java
index 40f1f0d08ef..bd8245b123c 100644
--- 
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriber.java
+++ 
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriber.java
@@ -28,7 +28,7 @@ import 
org.apache.shardingsphere.metadata.persist.node.ProcessNode;
 import org.apache.shardingsphere.mode.manager.ContextManager;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.RegistryCenter;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdEvent;
-import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessListIdUnitCompleteEvent;
+import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.KillProcessIdUnitCompleteEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListTriggerEvent;
 import 
org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.status.compute.event.ShowProcessListUnitCompleteEvent;
 
@@ -97,20 +97,20 @@ public final class ProcessListChangedSubscriber {
      */
     @Subscribe
     public synchronized void completeUnitShowProcessList(final 
ShowProcessListUnitCompleteEvent event) {
-        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessListId());
+        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessId());
         if (null != simpleLock) {
             simpleLock.doNotify();
         }
     }
     
     /**
-     * Complete unit kill process list id.
+     * Complete unit kill process id.
      *
-     * @param event kill process list id unit complete event
+     * @param event kill process id unit complete event
      */
     @Subscribe
-    public synchronized void completeUnitKillProcessListId(final 
KillProcessListIdUnitCompleteEvent event) {
-        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessListId());
+    public synchronized void completeUnitKillProcessId(final 
KillProcessIdUnitCompleteEvent event) {
+        ShowProcessListSimpleLock simpleLock = 
ShowProcessListManager.getInstance().getLocks().get(event.getProcessId());
         if (null != simpleLock) {
             simpleLock.doNotify();
         }
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/node/ProcessNodeTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/node/ProcessNodeTest.java
index e3f77b95ed8..02c617d5741 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/node/ProcessNodeTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/node/ProcessNodeTest.java
@@ -26,8 +26,8 @@ import static org.hamcrest.MatcherAssert.assertThat;
 class ProcessNodeTest {
     
     @Test
-    void assertGetProcessListIdPath() {
-        
assertThat(ProcessNode.getProcessListIdPath("ae7d352a-ee1f-3cd6-8631-cd9e93b70a30"),
 is("/execution_nodes/ae7d352a-ee1f-3cd6-8631-cd9e93b70a30"));
+    void assertGetProcessIdPath() {
+        
assertThat(ProcessNode.getProcessIdPath("ae7d352a-ee1f-3cd6-8631-cd9e93b70a30"),
 is("/execution_nodes/ae7d352a-ee1f-3cd6-8631-cd9e93b70a30"));
     }
     
     @Test
diff --git 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriberTest.java
 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriberTest.java
index c5e50c9883c..d9650fa39bf 100644
--- 
a/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriberTest.java
+++ 
b/mode/type/cluster/core/src/test/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/subscriber/ProcessListChangedSubscriberTest.java
@@ -100,9 +100,9 @@ class ProcessListChangedSubscriberTest {
     
     @Test
     void assertCompleteUnitShowProcessList() {
-        String processListId = "foo_process_id";
+        String processId = "foo_process_id";
         ShowProcessListSimpleLock lock = new ShowProcessListSimpleLock();
-        ShowProcessListManager.getInstance().getLocks().put(processListId, 
lock);
+        ShowProcessListManager.getInstance().getLocks().put(processId, lock);
         long startTime = System.currentTimeMillis();
         ExecutorService executorService = Executors.newFixedThreadPool(1);
         executorService.submit(() -> {
@@ -110,21 +110,21 @@ class ProcessListChangedSubscriberTest {
                 Thread.sleep(50L);
             } catch (final InterruptedException ignored) {
             }
-            subscriber.completeUnitShowProcessList(new 
ShowProcessListUnitCompleteEvent(processListId));
+            subscriber.completeUnitShowProcessList(new 
ShowProcessListUnitCompleteEvent(processId));
         });
         lockAndAwaitDefaultTime(lock);
         long currentTime = System.currentTimeMillis();
         assertTrue(currentTime >= startTime + 50L);
         assertTrue(currentTime <= startTime + 5000L);
-        ShowProcessListManager.getInstance().getLocks().remove(processListId);
+        ShowProcessListManager.getInstance().getLocks().remove(processId);
     }
     
     @Test
     void assertTriggerShowProcessList() throws ReflectiveOperationException {
         String instanceId = 
contextManager.getInstanceContext().getInstance().getMetaData().getId();
         
ShowProcessListManager.getInstance().putProcessContext("foo_execution_id", 
mock(ProcessContext.class));
-        String processListId = "foo_process_id";
-        subscriber.triggerShowProcessList(new 
ShowProcessListTriggerEvent(instanceId, processListId));
+        String processId = "foo_process_id";
+        subscriber.triggerShowProcessList(new 
ShowProcessListTriggerEvent(instanceId, processId));
         ClusterPersistRepository repository = ((RegistryCenter) 
Plugins.getMemberAccessor().get(ProcessListChangedSubscriber.class.getDeclaredField("registryCenter"),
 subscriber)).getRepository();
         verify(repository).persist("/execution_nodes/foo_process_id/" + 
instanceId,
                 "contexts:" + System.lineSeparator() + "- completedUnitCount: 
0\n  executing: false\n  startTimeMillis: 0\n  totalUnitCount: 0" + 
System.lineSeparator());
@@ -132,7 +132,7 @@ class ProcessListChangedSubscriberTest {
     }
     
     @Test
-    void assertKillProcessListId() throws SQLException, 
ReflectiveOperationException {
+    void assertKillProcessId() throws SQLException, 
ReflectiveOperationException {
         String instanceId = 
contextManager.getInstanceContext().getInstance().getMetaData().getId();
         String processId = "foo_process_id";
         subscriber.killProcessId(new KillProcessIdEvent(instanceId, 
processId));
diff --git 
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/KillProcessExecutor.java
 
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/KillProcessExecutor.java
index 759b30f933f..04a62d9b107 100644
--- 
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/KillProcessExecutor.java
+++ 
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/KillProcessExecutor.java
@@ -39,7 +39,7 @@ public final class KillProcessExecutor implements 
DatabaseAdminExecutor {
      */
     @Override
     public void execute(final ConnectionSession connectionSession) {
-        String processlistId = killStatement.getProcesslistId();
-        
ProxyContext.getInstance().getContextManager().getInstanceContext().getEventBusContext().post(new
 KillProcessIdRequestEvent(processlistId));
+        String processId = killStatement.getProcessId();
+        
ProxyContext.getInstance().getContextManager().getInstanceContext().getEventBusContext().post(new
 KillProcessIdRequestEvent(processId));
     }
 }
diff --git 
a/sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDALStatementVisitor.java
 
b/sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDALStatementVisitor.java
index c4f70427453..25d92faa5b1 100644
--- 
a/sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDALStatementVisitor.java
+++ 
b/sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/type/MySQLDALStatementVisitor.java
@@ -470,7 +470,7 @@ public final class MySQLDALStatementVisitor extends 
MySQLStatementVisitor implem
     @Override
     public ASTNode visitKill(final KillContext ctx) {
         MySQLKillStatement result = new MySQLKillStatement();
-        result.setProcesslistId(ctx.IDENTIFIER_().getText());
+        result.setProcessId(ctx.IDENTIFIER_().getText());
         return result;
     }
     
diff --git 
a/sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dal/MySQLKillStatement.java
 
b/sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dal/MySQLKillStatement.java
index a029934d455..404087b1acf 100644
--- 
a/sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dal/MySQLKillStatement.java
+++ 
b/sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/mysql/dal/MySQLKillStatement.java
@@ -30,5 +30,5 @@ import 
org.apache.shardingsphere.sql.parser.sql.dialect.statement.mysql.MySQLSta
 @Setter
 public final class MySQLKillStatement extends AbstractSQLStatement implements 
DALStatement, MySQLStatement {
     
-    private String processlistId;
+    private String processId;
 }
diff --git 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/impl/KillStatementAssert.java
 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/impl/KillStatementAssert.java
index f11aa0c1e6b..f4b8effa814 100644
--- 
a/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/impl/KillStatementAssert.java
+++ 
b/test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/asserts/statement/dal/impl/KillStatementAssert.java
@@ -40,6 +40,6 @@ public final class KillStatementAssert {
      * @param expected expected kill statement test case
      */
     public static void assertIs(final SQLCaseAssertContext assertContext, 
final MySQLKillStatement actual, final KillStatementTestCase expected) {
-        assertThat(assertContext.getText("Kill statement context does not 
match: "), actual.getProcesslistId(), is(expected.getProcessId()));
+        assertThat(assertContext.getText("Kill statement context does not 
match: "), actual.getProcessId(), is(expected.getProcessId()));
     }
 }


Reply via email to