You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "RaigorJiang (via GitHub)" <gi...@apache.org> on 2023/03/23 10:00:21 UTC

[GitHub] [shardingsphere] RaigorJiang opened a new issue, #24779: Difficult to drop readwrite_splitting rule with DistSQL

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

   ## Enhancement request
   
   ### Which version of ShardingSphere did you use?
   master 858305dc
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Actual behavior
   After creating a readwrite_splitting rule, if there are some single tables in the database, the rule cannot be dropped.
   
   ### Impact
   I discussed this limitation in a previous issue #22058. Limiting drop is to ensure business security, but it does bring inconvenience to actual use.
   
   Consider such a scenario:
   1. The user registers two storage units and configures the readwrite_splitting rule with them.
   2. When one of the storage units fails and the address needs to be changed:
   - Cannot ALTER storage unit, not allowed
   - Cannot DROP the storage unit because it is used by the readwrite_splitting rule
   3. Next, the user tries to DROP the readwrite_splitting rule, maybe the readwrite_splitting rule is also being used (if no sharding rule depends on it, there may be many single tables)
   
   At this point, the user may not know what to do.
   
   ### Suggestion
   For these special but tricky situations, I suggest referring to `UNREGISTER STORAGE UNIT`, adding the `IGNORE SINGLE TABLES` option to `DROP READWRITE_SPLITTING RULE`, so that if only single tables depend on the readwrite_splitting rule, the user can forcefully drop the rule and recreate a new one.
   
   Of course, this process requires the user to stop executing business SQL to ensure correctness.
   


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