Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actualDataNodes is wrong when ModShardingAlgorithm's zeroPadding is true #31053

Open
Aresxue opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@Aresxue
Copy link

Aresxue commented Apr 29, 2024

Which version of ShardingSphere did you use?

5.4.1

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

When ModShardingAlgorithm is used and zeroPadding is true and the shards exceed 10, the first shard of table user should be user_00

Actual behavior

the first shard of table user be user_0

Reason analyze (If you can)

For the scenario where zeroPadding of ModShardingAlgorithm is true, org.apache.shardingsphere.infra.datanode.DataNodeUtils#getFormatDataNodes should be adjusted accordingly.

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

@Aresxue Aresxue changed the title zeroPadding in ModShardingAlgorithm actualDataNodes is wrong when ModShardingAlgorithm's zeroPadding is true Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant