方便更快捷的说明问题,可以按需填写(可删除)
使用环境:
k8s环境部署,运行apache/shardingsphere-proxy:5.2.1版本,mysql-connector-java-5.1.47.jar
场景、问题:
执行 CREATE SHARDING TABLE RULE apploginlogs(
RESOURCES(ds_write_mutone0001),
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]
.
执行 CREATE SHARDING TABLE RULE apploginlogs(
RESOURCES(ds_write_mutone0001),
SHARDING_COLUMN=CreationTime,
TYPE(NAME=“COSID_INTERVAL”, PROPERTIES(“logic-name-prefix”=“apploginlogs_”,“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 [COSID_INTERVAL]
.
已进行操作:
执行CREATE SHARDING TABLE RULE t_order (
RESOURCES(ds_write_mutone0001),
SHARDING_COLUMN=id,TYPE(NAME=“hash_mod”,PROPERTIES(“sharding-count”=“4”)),
KEY_GENERATE_STRATEGY(COLUMN=id,TYPE(NAME=“snowflake”))
);
正常响应,执行AUTO_INTERVAL算法也是正常
现状:
根据时间范围数据分片不可用