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

   In a multi-tenant project implemented using Spring Boot, JPA, and 
ShardingSphere JDBC 5.2.1, I need to access the corresponding table based on 
the requested tenant ID. For instance, when user 'a' under a certain system 
tenant accesses student information, the SQL should be routed to the table 
t_student_{tenant_id}. Currently, this works as expected when called from the 
main thread. However, when invoked via asynchronous threads or parallel calls 
using Stream (with ForkJoinPool), since HintManager relies on ThreadLocal for 
context propagation and fails to inherit the parent thread's information, what 
approaches can be taken to achieve this goal?


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