[MXS-1552] Global thread id Created: 2017-11-29  Updated: 2022-09-08  Resolved: 2022-09-08

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbbackend, mariadbmon
Affects Version/s: None
Fix Version/s: N/A

Type: New Feature Priority: Major
Reporter: dapeng huang Assignee: Todd Stoffel (Inactive)
Resolution: Won't Do Votes: 0
Labels: None


 Description   

Currently, mxs send handshake to client,so the client get the thread id produced by mxs, after the authentication between client and mxs is finished, mxs connect to backend, and backend produce another thread id, these two thread ids are not the same, it will be lead to some problem;

Proposal:
1. use mariadb's sequence mechanism to get a thread id range(https://mariadb.com/kb/en/library/sequence-overview),and mxs generate thread id in the range;
2. when connect to the backend, put the thead id in the handshake response's attribute filed,and server use the given thread id;



 Comments   
Comment by markus makela [ 2020-10-19 ]

This requires server changes to support assignment of the connection ID. This can also cause problems when reconnections occur; two separate connections could end up using the same ID and this could cause problems in the server. Regardless of this, we first need server to implement something before we can do anything in MaxScale.

What we could do is add the MaxScale session ID into the connection attributes to show which MaxScale session the backend connection relates to.

Generated at Thu Feb 08 04:07:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.