jdxia commented on issue #35123: URL: https://github.com/apache/shardingsphere/issues/35123#issuecomment-2897816556
> One solution is to create ShardingSphereDataSource directly like [@jdxia](https://github.com/jdxia) did, without using ShardingSphereDriver; this is a good solution, but it has certain requirements for developers. > > Another solution is to clear the cache after each transaction is completed, based on the current use of ShardingSphereDriver, so as to avoid long-term occupation of the backend connection. Transactions will be cleared, but what about non-transactions? If you use hikaricp, you may have difficulty detecting this problem. You can take a look at the Hikaricp source code getConncetion. If there is one in its threadlocal, take it from it, and return the connection to the threadlocal. hikaricp This optimization feature delays the problem, but the concurrency is still high. If anyone is interested, you can think about why, haha -- 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]
