You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/18 15:11:49 UTC

[GitHub] [shardingsphere] gavenpeng opened a new pull request, #18420: support forced route by hint and not influcenced with sharding rule config

gavenpeng opened a new pull request, #18420:
URL: https://github.com/apache/shardingsphere/pull/18420

   Increment feature:support forced route by hint not influenced with sharding config
   
   Changes proposed in this pull request:
   support force routing by hint with in code mode,as long as the thread context has the force-routing flag,may be route
   to config database or config table,not influenced by sharding rule config.
   
   demo:
   public void demoFunc() {
       
       HintManager hintManager = HintManager.getInstance();
       //force route to config database 
       hintManager.addDatabaseShardingValue("logic_database_name", "real_database_name");
       // force route to 
       hintManager.addTableShardingValue("logic_table_name", "real_table_name");
       try {     
           //your code
       } catch (Throwable e) {
           xxxxxxx   
       } finally {
           // this is must
           hintManager.close();   
       }
   }
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] gavenpeng closed pull request #18420: support forced route by hint and not influcenced with sharding rule config

Posted by GitBox <gi...@apache.org>.
gavenpeng closed pull request #18420: support forced route by hint and not influcenced with sharding rule config
URL: https://github.com/apache/shardingsphere/pull/18420


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] gavenpeng commented on pull request #18420: support forced route by hint and not influcenced with sharding rule config

Posted by GitBox <gi...@apache.org>.
gavenpeng commented on PR #18420:
URL: https://github.com/apache/shardingsphere/pull/18420#issuecomment-1159608335

   > The hint strategy contains hint value and hint algorithm, and ShardingSphere only can support config single strategy for sharding (hint or standard), how to use them together?
   
   this feature is support force route when sharding strategy is standard, user can hint config routing database or table


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org