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/02/18 09:35:40 UTC
[GitHub] [shardingsphere] lanchengx opened a new issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
lanchengx opened a new issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501
## Bug Report
### Which version of ShardingSphere did you use?
Master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
Successfully modified
### Actual behavior
`scaling is not enabled exception` occurs
<img width="1210" alt="image" src="https://user-images.githubusercontent.com/52209337/154654949-8248afe8-3a87-43e2-a767-c325f8b6feb4.png">
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```shell
mysql> ADD RESOURCE ds_0 (
HOST=127.0.0.1,
PORT=3306,
DB=demo_ds_0,
USER=root,
PASSWORD=root
);
Query OK, 0 rows affected (0.23 sec)
mysql> ADD RESOURCE ds_1 (
HOST=127.0.0.1,
PORT=3306,
DB=demo_ds_0,
USER=root,
PASSWORD=root
);
Query OK, 0 rows affected (0.16 sec)
mysql> CREATE SHARDING TABLE RULE t_order (
RESOURCES(ds_0,ds_1),
SHARDING_COLUMN=order_id,TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME=snowflake))
);
Query OK, 0 rows affected (0.12 sec)
mysql> Alter SHARDING TABLE RULE t_order (
RESOURCES(ds_0),
SHARDING_COLUMN=order_id,TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME=snowflake))
);
1997 - Runtime exception: [scaling is not enabled]
```
--
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] RaigorJiang commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044241639
Hi @sandynz
If the user does not need to use the scaling feature, or has created a sharding rule and has not written data yet, should scaling be configured before it can be used? This looks a little confusing
--
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] sandynz commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044232029
Yes, it's forbidden to alter some sharding rule, since the underlying data is not migrated, if we alter sharding rule, it might cause issue (rule is not consistent with underlying data sharding).
Related issue is #14719.
--
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] sandynz commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044239253
Maybe the error message should be updated, then it's more clear for users to understand it.
--
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] RaigorJiang closed issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501
--
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] sandynz commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044285593
> Hi @sandynz If the user does not need to use the scaling feature, or has created a sharding rule and has not written data yet, should scaling be configured before it can be used? This looks a little confusing
Yes, it could be improved.
If there already has underlying data and to be altered rule would change data sharding, then scaling feature is necessary.
Else, the limit could be passed, but solution is unknown for now. Solution should be different after metadata multi-version is ready.
--
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] sandynz commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044303879
I'll disable the exception for now, until metadata multi-version and solution is ready.
--
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] RaigorJiang commented on issue #15501: `scaling is not enabled` exception occurs when executing `ALTER SHARDING TABLE RULE`
Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #15501:
URL: https://github.com/apache/shardingsphere/issues/15501#issuecomment-1044333034
> I'll disable the exception for now, until metadata multi-version and solution is ready.
I am agree with you.
--
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