You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Bingo20 (via GitHub)" <gi...@apache.org> on 2023/11/08 14:41:21 UTC
[I] insert failed with foreign key greater than 10158238 [shardingsphere]
Bingo20 opened a new issue, #28987:
URL: https://github.com/apache/shardingsphere/issues/28987
## Bug Report
I am using sharding-sphere proxy docker image to insert data to mysql. I have two sharding tables: data & data_gt_version, where data_gt_version has a field dataId references data on column id. I found a wierd situation: when dataId >= 10158238, insertion fails without error output.
Example insert sql:
> INSERT IGNORE INTO `welabel-shard2`.data_gt_version (id, created_at, updated_at, deleted_at, value, gt_version, dataId, extUserId) VALUES (
4658625, DEFAULT, DEFAULT, DEFAULT, 'xxx', '-1', 10158238, 3);
my sharding config:
>databaseName: welabel-shard2
>
>dataSources:
> welabel:
> url: jdbc:mysql://xxx
> username: 111
> password: 222
> connectionTimeoutMilliseconds: 30000
> idleTimeoutMilliseconds: 60000
> maxLifetimeMilliseconds: 1800000
> maxPoolSize: 50
> minPoolSize: 1
>#
>rules:
>- !SHARDING
> tables:
> data:
> actualDataNodes: welabel.data_${0..9}
> tableStrategy:
> standard:
> shardingColumn: id
> shardingAlgorithmName: data_inline
> keyGenerateStrategy:
> column: id
> keyGeneratorName: snowflake
> data_gt_version:
> actualDataNodes: welabel.data_gt_version_${0..9}
> tableStrategy:
> standard:
> shardingColumn: id
> shardingAlgorithmName: data_gtv_inline
> keyGenerateStrategy:
> column: id
> keyGeneratorName: snowflake
> bindingTables:
> - data
> - data_gt_version
> defaultTableStrategy:
> none:
> shardingAlgorithms:
> data_inline:
> type: INLINE
> props:
> algorithm-expression: data_${id % 10}
> allow-range-query-with-inline-sharding: true
> data_gtv_inline:
> type: INLINE
> props:
> algorithm-expression: data_gt_version_${id % 10}
> keyGenerators:
> snowflake:
> type: SNOWFLAKE
--
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
Re: [I] insert failed with foreign key greater than 10158238 [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #28987:
URL: https://github.com/apache/shardingsphere/issues/28987#issuecomment-2212482079
Based on your description of the issue, I do not believe it is caused by ShardingSphere.
--
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
Re: [I] insert failed with foreign key greater than 10158238 [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #28987: insert failed with foreign key greater than 10158238
URL: https://github.com/apache/shardingsphere/issues/28987
--
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
Re: [I] insert failed with foreign key greater than 10158238 [shardingsphere]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #28987:
URL: https://github.com/apache/shardingsphere/issues/28987#issuecomment-1847778557
There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
--
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
Re: [I] insert failed with foreign key greater than 10158238 [shardingsphere]
Posted by "Bingo20 (via GitHub)" <gi...@apache.org>.
Bingo20 commented on issue #28987:
URL: https://github.com/apache/shardingsphere/issues/28987#issuecomment-1802045754
dataId <= 10158237 can be insert to table data_gt_version:

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