question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support hint in sharding-proxy

See original GitHub issue

hint was supported by sharding-jdbc by thread-local. but it can’t work in sharding-proxy. we can extend sctl to support it in sharding-proxy. it looks like that

  • sctl:hint set MASTER_ONLY=true
  • sctl:hint set DatabaseShardingValue=xx. ## xx: sharding value
  • sctl:hint addTableShardingValue xx=yy ## xx: logicTableName,yy:sharding value
  • sctl:hint addDatabaseShardingValue xx=yy. ## xx: logicTableName,yy:sharding value

sctl:hint command can be sent to proxy through JDBC, e.g. connection.createStatement("stcl:hint set xxxx"), after proxy received the request, it should be dispatched to HintSCTLCommandHander like ShardingCTLSetBackendHandler, then stored the hint content in current channel(BackendConnection)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
cherrylzhaocommented, Sep 18, 2019

command looks like this, sctl:hint show status

0reactions
cherrylzhaocommented, Sep 19, 2019

close this issue, will discuss query context function in #3057

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manual - Apache ShardingSphere
Sharding -Proxy does not support hint by default, to support it, set the props property proxy.hint.enabled to true in conf/server.yaml.In Sharding-Proxy.
Read more >
How to Use ShardingSphere-Proxy in Real Scenarios—Your ...
This post details how to use ShardingSphere-Proxy, its strengths, its differences with Shardingsphere-JDBC and provides you with 3 examples based on real ...
Read more >
ShardingSphere 5.2.1 is released — Here are the highlights
The new release enhances the SQL HINT capability and supports data-sharding mandatory routing. Users only need to add annotations in the ...
Read more >
Database Hints - Oracle to Aurora MySQL Migration Playbook
Aurora MySQL supports two types of hints: optimizer hints and index hints. Index Hints. The USE INDEX hint limits the optimizer's choice to...
Read more >
RELEASE-NOTES.md · tuohai666/incubator-shardingsphere ... - Gitee
Support hint in Sharding -Proxy. Finish parsing DAL syntax for MySQL. Make configuration of orchestration compatible between Sharding-JDBC and Sharding-Proxy.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found