You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
5.3.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
Hi @alei78910
I reproduced the problem and the reason for the exception is as follows:
INTERVAL is one of the standard sharding algorithms, it does not belong to the auto sharding algorithm;
Please pay attention to the difference defined in sharding table rule. The auto sharding algorithm uses STORAGE_UNITS to specify the data source, and the standard sharding algorithm uses DATANODES to specify data nodes;
Because you defined with STORAGE_UNITS, when checking the rules according to the auto sharding algorithm, it is found that INTERVAL does not meet the requirements
The above is the reason for this problem, but this prompt message is really not easy to understand, thank you for your feedback.
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
5.3.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
apache/shardingsphere-proxy:5.3.0,mysql-connector-java-5.1.47.jar
Expected behavior
CREATE DATABASE db_test_common CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';
USE db_test_common;
REGISTER STORAGE UNIT ds_write_test_common( URL="jdbc:mysql://10.98.59.35:3306/db_common_test?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2b8", USER="root", PASSWORD="123456");
CREATE SHARDING TABLE RULE apploginlog(
STORAGE_UNITS(ds_write_test_common),
SHARDING_COLUMN=CreationTime,
TYPE(NAME="INTERVAL", PROPERTIES("datetime-pattern"="yyyy-MM-dd HH:mm:ss","datetime-interval-unit"="MONTHS","datetime-interval-amount"="1","sharding-suffix-pattern"="yyyyMM","datetime-lower"="2016-01-01 00:00:00","datetime-upper"="2099-12-31 00:00:00"))
);
Actual behavior
CREATE DATABASE is OK;
REGISTER STORAGE UNIT is OK;
CREATE SHARDING TABLE RULE is error, ERROR 19150 (44000): Invalid sharding algorithms
[INTERVAL]
.Reason analyze (If you can)
使用apache/shardingsphere-proxy:5.2.1版本,执行CREATE SHARDING TABLE RULE apploginlogs(
RESOURCES(ds_write_test_common),
SHARDING_COLUMN=CreationTime,
TYPE(NAME=“INTERVAL”, PROPERTIES(“datetime-pattern”=“yyyy-MM-dd HH:mm:ss”,“datetime-interval-unit”=“MONTHS”,“datetime-interval-amount”=“1”,“sharding-suffix-pattern”=“yyyyMM”,“datetime-lower”=“2016-01-01 00:00:00”,“datetime-upper”=“2099-12-31 00:00:00”))
);也是报错ERROR 19150 (44000): Invalid sharding algorithms [INTERVAL]
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
The text was updated successfully, but these errors were encountered: