strongduanmu commented on code in PR #21000:
URL: https://github.com/apache/shardingsphere/pull/21000#discussion_r973826879
##########
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/kernel/model/ExecutionGroupContext.java:
##########
@@ -38,7 +38,7 @@
private final Collection<ExecutionGroup<T>> inputGroups;
- private final String executionID = new
UUID(ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
+ private String executionID = new
UUID(ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong()).toString().replace("-", "");
Review Comment:
Can we move `new UUID` to proxy and jdbc adaptor?
##########
shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/process/ExecuteProcessEngine.java:
##########
@@ -41,13 +45,41 @@
public final class ExecuteProcessEngine {
/**
- * Initialize.
+ * Initialize connection.
+ *
+ * @param grantee grantee
+ * @param databaseName database name
+ * @param eventBusContext event bus context
+ * @return execution id
+ */
+ public static String initializeConnection(final Grantee grantee, final
String databaseName, final EventBusContext eventBusContext) {
+ ExecutionGroupContext<SQLExecutionUnit> executionGroupContext = new
ExecutionGroupContext<>(Collections.emptyList());
+ executionGroupContext.setExecutionID(new
UUID(ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong()).toString());
Review Comment:
Please add `.replace("-", "")` after `new
UUID(ThreadLocalRandom.current().nextLong(),
ThreadLocalRandom.current().nextLong()).toString()` single mysql kill
processlist statement parse logic doesn't support `-`.
--
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]