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

Can not get uniformed table structure for logic table Can not get uniformed table structure for logic table normal_record, it has different meta data of actual tables are as follows, it has different meta data of actual tables are as follows #30939

Open
shijie-328931589 opened this issue Apr 17, 2024 · 1 comment
Labels

Comments

@shijie-328931589
Copy link

Bug Report

Which version of ShardingSphere did you use?

5.4.1

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

ShardingSphere-JDBC

Expected behavior

the simple table should not appear InconsistentShardingTableMetaDataException

Actual behavior

Caused by: org.apache.shardingsphere.sharding.exception.metadata.InconsistentShardingTableMetaDataException: Can not get uniformed table structure for logic table normal_record, it has different meta data of actual tables are as follows:
actual table: normal_record, meta data: TableMetaData(name=normal_record, columns=[ColumnMetaData(name=id, dataType=-5, primaryKey=true, generated=true, caseSensitive=true, visible=true, unsigned=false, nullable=false), ColumnMetaData(name=description, dataType=12, primaryKey=false, generated=false, caseSensitive=true, visible=true, unsigned=false, nullable=true)], indexes=[IndexMetaData(name=normal_record_pkey, columns=[id], unique=true)], constraints=[])
actual table: normal_record, meta data: TableMetaData(name=normal_record, columns=[ColumnMetaData(name=id, dataType=-5, primaryKey=true, generated=true, caseSensitive=true, visible=true, unsigned=false, nullable=false), ColumnMetaData(name=description, dataType=12, primaryKey=false, generated=false, caseSensitive=true, visible=true, unsigned=false, nullable=true)], indexes=[IndexMetaData(name=normal_record_pkey, columns=[id], unique=true)], constraints=[])

error10

Reason analyze (If you can)

In TableMetaData definition,the field ’indexes‘ is Collection; In the running, the collection type is AbstractMapBasedMultimap.WrappedSet for the field 'indexes' and 'constraints' , In WrappedSet , equal and hashset is not suitable for this scene.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

in sharding database,use the same datasource to config,and set CHECK_TABLE_METADATA_ENABLED true

Example codes for reproduce this issue (such as a github link).

Copy link

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.

@github-actions github-actions bot added the stale label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant