You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/02/12 07:33:19 UTC
[GitHub] terrymanu commented on issue #1620: what is the lifecycle of hint
terrymanu commented on issue #1620: what is the lifecycle of hint
URL: https://github.com/apache/incubator-shardingsphere/issues/1620#issuecomment-462648539
@leehom I cannot get your point. Hint is keep same lifecycle with connection, if connection closed, hint should be closed.
Can you make an example for if user need hold hint even connection closed?
> i think, in some time, such as db connection pool, tm would not close the connection.
If connection did not close, hint also did not close automatically, user can close it by themselves. Any question here?
> first, shardingConnection.close would not be invoked, if Connection is managed by pool, then hint dosen't clear and keep in thread
Why? Whatever connection is managed by pool or not, they just use JDBC to call connection.close, will close hint together.
> second, hints would keep in the thread that managed by pool, and be shared by multi requests, that made things confused.
I don't think so. Hint should not cross thread.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services