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/08/25 10:06:27 UTC
[GitHub] [shardingsphere] zjcnb commented on a diff in pull request #20493: Intercept statements that modify the sharding rule
zjcnb commented on code in PR #20493:
URL: https://github.com/apache/shardingsphere/pull/20493#discussion_r954774182
##########
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/handler/distsql/rdl/rule/RuleDefinitionBackendHandler.java:
##########
@@ -70,6 +70,9 @@ protected ResponseHeader execute(final String databaseName, final T sqlStatement
ShardingSphereDatabase database = ProxyContext.getInstance().getDatabase(databaseName);
RuleConfiguration currentRuleConfig = findCurrentRuleConfiguration(database, ruleConfigClass).orElse(null);
ruleDefinitionUpdater.checkSQLStatement(database, sqlStatement, currentRuleConfig);
+ if (NOT_SUPPORT_ALTERED_ACTIONS.contains(sqlStatement.getClass().getCanonicalName())) {
+ throw new UnsupportedOperationException("not support altered sharding config, it's may cause data incorrectly");
Review Comment:
Maybe use `Not` instead of `not` is better.
--
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