tristaZero commented on pull request #6359:
URL: https://github.com/apache/shardingsphere/pull/6359#issuecomment-661600503


   @SirMin  Hi
   > The usage should be clearly indicated in the document,Instead of disabling 
this method because of some restrictions.
   
   IMO, it is better to make users understand the usage of functions by 
functions themselves, like `newInstance()` is better than `getInstance()`.
   
   > And I think it is not a good practice to use a big class to manage the 
entire Hint, because it is possible that I need to set the Hint separately.
   
   Do you mean the following one?
   ` private static final ThreadLocal<HintManager> HINT_MANAGER_HOLDER = new 
ThreadLocal<>();`
   
   Its detail is open to ShardingSphere, and nearly closed to users, 
preferably. Most of the users will not dig into the source codes.
   
   > For example, the place where I get the database sharding value and the 
place where the table sharding value is not the same place, then I will not be 
able to Decide whether to clear
   
   Yep, that the reason why I want to merge this PR at first!
   
   My concern comes down to this: If we return the same instance of 
`hintManager`, how we can remind users that the different one will be returned 
in other threads.


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to