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/10/10 06:33:40 UTC

[GitHub] [shardingsphere] strongduanmu opened a new issue, #19755: Consider optimizing exception message in ShardingInsertStatementValidator

strongduanmu opened a new issue, #19755:
URL: https://github.com/apache/shardingsphere/issues/19755

   ## Feature Request
   
   ### Is your feature request related to a problem?
   
   #11623
   
   ### Describe the feature you would like.
   
   Now, we have added validation logic for insert statements in the `ShardingInsertStatementValidator` class to ensure that the same record can only be routed to one shard. 
   
   But there are various scenarios that cause this exception to occur. The first is that the sharding key value in sql is not a literal, which leads to full routing. Just like `INSERT INTO t_order (order_id, user_id, status) VALUES (1+1, 2, 'insert');
   `. The second is that the sharding algorithm logic is abnormal, causing the same record to be routed to multiple shards. We need to distinguish these scenarios by different exception classes, so that users can quickly locate the problem.
   


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

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


[GitHub] [shardingsphere] lhyundeadsoul commented on issue #19755: Consider optimizing exception message in ShardingInsertStatementValidator

Posted by GitBox <gi...@apache.org>.
lhyundeadsoul commented on issue #19755:
URL: https://github.com/apache/shardingsphere/issues/19755#issuecomment-1232643791

   @strongduanmu I am trying to solve this
   But I am not sure if I find the right code location, especially in the second scenario(The second is that the sharding algorithm logic is abnormal)
   I hope you can help me to review this PR when you are free. Thx a lot.


-- 
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] github-actions[bot] commented on issue #19755: Consider optimizing exception message in ShardingInsertStatementValidator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #19755:
URL: https://github.com/apache/shardingsphere/issues/19755#issuecomment-1272349124

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] github-actions[bot] closed issue #19755: Consider optimizing exception message in ShardingInsertStatementValidator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #19755: Consider optimizing exception message in ShardingInsertStatementValidator
URL: https://github.com/apache/shardingsphere/issues/19755


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