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 2021/06/18 21:10:13 UTC
[GitHub] [shardingsphere] darkaquarius opened a new issue #10862: When to support native auto-incrementing primary keys
darkaquarius opened a new issue #10862:
URL: https://github.com/apache/shardingsphere/issues/10862
When can we support native auto-incrementing primary keys, some of our tables need to use auto-incrementing primary keys
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz commented on issue #10862: When to support native auto-incrementing primary keys
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #10862:
URL: https://github.com/apache/shardingsphere/issues/10862#issuecomment-927800629
Hi @darkaquarius , distributed id generator is a dividual system usually, you could install one of them ( e.g. [Leaf](https://github.com/Meituan-Dianping/Leaf) ), and set generated id in SQL.
--
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] terrymanu commented on issue #10862: When to support native auto-incrementing primary keys
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #10862:
URL: https://github.com/apache/shardingsphere/issues/10862#issuecomment-927299439
Does anyone interest this issue?
--
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] darkaquarius commented on issue #10862: When to support native auto-incrementing primary keys
Posted by GitBox <gi...@apache.org>.
darkaquarius commented on issue #10862:
URL: https://github.com/apache/shardingsphere/issues/10862#issuecomment-863879344
when I insert a line to table skill_theme_read, or table skill_evaluation_xx,do NOT support auto-incrementing primary keys
shardingsphere version: 5.0.0-RC1-SNAPSHOT
Table Structure:
CREATE TABLE `skill_theme_read` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` bigint(20) NOT NULL,
`theme_id` bigint(11) NOT NULL COMMENT 'theme_info表的id,主题id',
`update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`add_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='技能包是否已读';
sharing-jdbc config:
dataSources:
mysql_0:
driverClassName: com.mysql.jdbc.Driver
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
......
rules:
# 配置分片规则
- !SHARDING
defaultDatabaseStrategy:
none:
defaultTableStrategy:
none:
tables:
skill_collection:
actualDataNodes: mysql_0.skill_collection_${0..99}
# 配置分表策略
tableStrategy:
standard:
shardingColumn: uid
shardingAlgorithmName: skill_collection_inline
skill_evaluation:
actualDataNodes: mysql_0.skill_evaluation_${0..99}
# 配置分表策略
tableStrategy:
standard:
shardingColumn: uid
shardingAlgorithmName: skill_evaluation_inline
# 配置分片算法
shardingAlgorithms:
skill_collection_inline:
type: INLINE
props:
algorithm-expression: skill_collection_${uid % 100}
skill_evaluation_inline:
type: INLINE
props:
algorithm-expression: skill_evaluation_${uid % 100}
props:
sql-show: true
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz closed issue #10862: When to support native auto-incrementing primary keys
Posted by GitBox <gi...@apache.org>.
sandynz closed issue #10862:
URL: https://github.com/apache/shardingsphere/issues/10862
--
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