PeiMouRen opened a new issue, #19753:
URL: https://github.com/apache/shardingsphere/issues/19753

   **config-sharding.yaml**
   ```
   databaseName: db
   #
   dataSources:
     ds0:
       url: jdbc:postgresql://localhost:5432/shard1?stringtype=unspecified
       username: db
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds1:
       url: jdbc:postgresql://localhost:5432/shard2?stringtype=unspecified
       username: db
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds2:
       url: jdbc:postgresql://localhost:5432/shard3?stringtype=unspecified
       username: db
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds3:
       url: jdbc:postgresql://localhost:5432/shard3?stringtype=unspecified
       username: db
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
   - !SHARDING
     tables:
       t_user:
         actualDataNodes: readwrite_ds$->{0..1}.t_user
         databaseStrategy: 
           standard: 
             shardingColumn: phone
             shardingAlgorithmName: database-class-base 
         keyGenerateStrategy:
           column: id
           keyGeneratorName: snowflake
     broadcastTables:
       - t_city
     shardingAlgorithms:
       database-class-base:
         type: CLASS_BASED
         props:
           strategy: STANDARD
           algorithmClassName: 
com.wisentsoft.sharding.algorithm.PhoneTailShardingAlgorithm
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
   
   - !READWRITE_SPLITTING
     dataSources:
       readwrite_ds0:
         type: Static
         props:
           write-data-source-name: ds2
           read-data-source-names: ds3
         loadBalancerName: random
       readwrite_ds1:
         type: Static
         props:
           write-data-source-name: ds0
           read-data-source-names: ds1
         loadBalancerName: random
     loadBalancers:
       random:
         type: RANDOM
   ```
   
   When I delete the `broadcastTables` configuration, the system cannot be 
started normally and the following error was reported:
   ```java
   Exception in thread "main" 
org.apache.shardingsphere.infra.exception.ShardingSphereException: Cannot get 
uniformed table structure for logic table `t_city`, it has different meta data 
of actual tables are as follows:
   actual table: t_city, meta data: TableMetaData(name=t_city, 
columns=[ColumnMetaData(name=city_code, dataType=12, primaryKey=false, 
generated=false, caseSensitive=true), ColumnMetaData(name=province_code, 
dataType=12, primaryKey=false, generated=false, caseSensitive=true), 
ColumnMetaData(name=postcode, dataType=12, primaryKey=false, generated=false, 
caseSensitive=true), ColumnMetaData(name=city_name, dataType=12, 
primaryKey=false, generated=false, caseSensitive=true), 
ColumnMetaData(name=remark, dataType=12, primaryKey=false, generated=false, 
caseSensitive=true)], indexes=[], constrains=[])
   actual table: t_city, meta data: TableMetaData(name=t_city, 
columns=[ColumnMetaData(name=city_code, dataType=12, primaryKey=false, 
generated=false, caseSensitive=true), ColumnMetaData(name=province_code, 
dataType=12, primaryKey=false, generated=false, caseSensitive=true), 
ColumnMetaData(name=postcode, dataType=12, primaryKey=false, generated=false, 
caseSensitive=true), ColumnMetaData(name=city_name, dataType=12, 
primaryKey=false, generated=false, caseSensitive=true), 
ColumnMetaData(name=remark, dataType=12, primaryKey=false, generated=false, 
caseSensitive=true)], indexes=[], constrains=[])
   
   
   ```


-- 
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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to