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

duanzhengqiang 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 7317b91b383 Fix show processlist does not collect the execution info 
of sub threads (#23552)
7317b91b383 is described below

commit 7317b91b3836a429c01c9c708f1b1555b80290d5
Author: ZhangCheng <[email protected]>
AuthorDate: Sat Jan 14 12:18:52 2023 +0800

    Fix show processlist does not collect the execution info of sub threads 
(#23552)
---
 .../infra/executor/sql/process/ExecuteProcessEngine.java              | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
 
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
index 2bff40b6d63..206d87967cc 100644
--- 
a/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
+++ 
b/infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java
@@ -100,9 +100,7 @@ public final class ExecuteProcessEngine {
      */
     public static void finishExecution(final String executionID, final 
SQLExecutionUnit executionUnit, final EventBusContext eventBusContext) {
         Optional<ExecuteProcessReporter> reporter = 
OptionalSPIRegistry.findRegisteredService(ExecuteProcessReporter.class);
-        if (reporter.isPresent() && 
ExecutorDataMap.getValue().containsKey(ExecuteProcessConstants.EXECUTE_ID.name()))
 {
-            reporter.get().report(executionID, executionUnit, 
ExecuteProcessConstants.EXECUTE_STATUS_DONE, eventBusContext);
-        }
+        reporter.ifPresent(executeProcessReporter -> 
executeProcessReporter.report(executionID, executionUnit, 
ExecuteProcessConstants.EXECUTE_STATUS_DONE, eventBusContext));
     }
     
     /**

Reply via email to