MilanTyagi2004 commented on issue #37404:
URL:
https://github.com/apache/shardingsphere/issues/37404#issuecomment-3677903132
Hi @ShenFeng312, thanks for the clarification. I fully agree with this
understanding.
Based on this, I’ve prepared a solution where the connection ID sent in the
handshake packet itself is made cluster-aware, instead of using JVM-level
auto-incremented IDs.
In the solution:
- The handshake connection ID embeds a cluster-unique node identifier,
ensuring global uniqueness across proxy nodes.
- The JDBC driver therefore uses a non-ambiguous ID for Statement.cancel() /
KILL QUERY.
- When a kill command is received, the proxy can deterministically identify
whether the connection belongs to the local node or
route it to the correct node.
- This avoids ID duplication entirely and aligns with native MySQL behavior
where the handshake ID and processlist ID are the same.
- The changes are ready on my side. Please let me know if you’d like me to
raise the PR for review, or if there’s any preferred
direction or adjustment before doing so.
Thanks for your guidance.
--
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]