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/25 15:49:06 UTC

[GitHub] [shardingsphere] gavenpeng opened a new pull request, #18592: Support force route db or table use hint

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

   Increment feature:support forced route use hint not influenced with sharding strategy
   
   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 strategy 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 commented on pull request #18592: Support force route db or table use hint

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

   me set the actual table name or actual db name for the second param xxx is not do sharding with strategy,may be direct return the actual value,this maybe exist incorrect use hint


-- 
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] terrymanu merged pull request #18592: Support force route db or table use hint

Posted by GitBox <gi...@apache.org>.
terrymanu merged PR #18592:
URL: https://github.com/apache/shardingsphere/pull/18592


-- 
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] terrymanu commented on pull request #18592: Support force route db or table use hint

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

   The design maybe incorrect. 
   `hintManager.addDatabaseShardingValue("logic_database_name", xxx)`
   
   The second param `xxx` should be sharding value, not actual table name.


-- 
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] codecov-commenter commented on pull request #18592: Support force route db or table use hint

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #18592:
URL: https://github.com/apache/shardingsphere/pull/18592#issuecomment-1166324651

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#18592](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0c1fb73) into [master](https://codecov.io/gh/apache/shardingsphere/commit/2b1edcf80866fce3951447ae742b21ed7327b072?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2b1edcf) will **increase** coverage by `0.01%`.
   > The diff coverage is `85.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #18592      +/-   ##
   ============================================
   + Coverage     59.31%   59.32%   +0.01%     
     Complexity     2255     2255              
   ============================================
     Files          3717     3717              
     Lines         54705    54722      +17     
     Branches       9316     9323       +7     
   ============================================
   + Hits          32448    32465      +17     
   + Misses        19511    19508       -3     
   - Partials       2746     2749       +3     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...e/type/standard/ShardingStandardRoutingEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/18592/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmcvc2hhcmRpbmdzcGhlcmUtc2hhcmRpbmctY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc2hhcmRpbmcvcm91dGUvZW5naW5lL3R5cGUvc3RhbmRhcmQvU2hhcmRpbmdTdGFuZGFyZFJvdXRpbmdFbmdpbmUuamF2YQ==) | `94.33% <85.00%> (-2.29%)` | :arrow_down: |
   | [...d/text/distsql/ral/common/hint/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/18592/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2Rpc3RzcWwvcmFsL2NvbW1vbi9oaW50L0hpbnRTb3VyY2VUeXBlLmphdmE=) | `42.85% <0.00%> (+42.85%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2b1edcf...0c1fb73](https://codecov.io/gh/apache/shardingsphere/pull/18592?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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