FlyingZC opened a new issue, #23546:
URL: https://github.com/apache/shardingsphere/issues/23546

   ## Bug Report
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   Master.
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   Show processlist can collect the execution info of sub threads
   
   ### Actual behavior
   Show processlist does not collect the execution info of sub threads
   
   ### Reason analyze (If you can)
   ```java
     public static void finishExecution(final String executionID, final 
SQLExecutionUnit executionUnit, final EventBusContext eventBusContext) {
         Optional<ExecuteProcessReporter> reporter = 
OptionalSPIRegistry.findRegisteredService(ExecuteProcessReporter.class);
        // ExecuteProcessConstants.EXECUTE_ID is not exist in sub thread
         if (reporter.isPresent() && 
ExecutorDataMap.getValue().containsKey(ExecuteProcessConstants.EXECUTE_ID.name()))
 {
             reporter.get().report(executionID, executionUnit, 
ExecuteProcessConstants.EXECUTE_STATUS_DONE, eventBusContext);
         }
     }
   ```
   The sub thread does not have the executionId in threadLocal, and show 
processlist does not collect the execution info of sub threads.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   Execute `CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, 
status VARCHAR(45) NULL, PRIMARY KEY (order_id)); `, and debug the method of 
`org.apache.shardingsphere.infra.executor.sql.process.ExecuteProcessEngine#finishExecution()`,the
 method will not be called in sub thread.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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]

Reply via email to