xinghh100-githhub commented on issue #2283: Can a broadcast table specify some 
data sources instead of all data sources?
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2283#issuecomment-487345044
 
 
   ----------------------
   schemaName: xxx
   
   dataSources:
     ds_1:
       url: 
jdbc:mysql://localhost:3306/bizb?useSSL=false&useUnicode=true&characterEncoding=utf-8
       username: root
       password: XXX
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_0:
       url: 
jdbc:mysql://localhost:3306/biza?useSSL=false&useUnicode=true&characterEncoding=utf-8
       username: root
       password: XXX
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     ds_2:
       url: 
jdbc:mysql://localhost:3306/bizc?useSSL=false&useUnicode=true&characterEncoding=utf-8
       username: root
       password: XXX
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   shardingRule:
     tables:
       t_order:
         actualDataNodes: ds_2.t_order_${201901..201912}
         tableStrategy:
           standard:
             shardingColumn: op_time
             preciseAlgorithmClassName: 
cc.xxx.shardingsphere.sharding.PartitionByMonthPreciseShardingAlgorithm
             rangeAlgorithmClassName: 
cc.xxx.shardingsphere.sharding.PartitionByMonthRangeShardingAlgorithm
         keyGenerator:
           type: SNOWFLAKE
           column: order_id
     broadcastTables:
       - t_district
       - t_parklot
   
     defaultDataSourceName: ds_0
     defaultDatabaseStrategy:
       none:
     defaultTableStrategy:
       none:
   
   ----------------------
   For example, the configuration of the upper description:
   
   The broadcast table t_district in the configuration, the default data node 
is ds_${0..2}.t_district, but in the actual application scenario, only the data 
node needs to be broadcast: ds_${0..1}.t_district, and The table t_district 
does not exist in the data source ds_2. When a DML operation is performed, an 
exception is thrown: ERROR 1146 (42S02): Table 'bizc.t_district' doesn't exist.
   
   I think if the existing version supports the above-mentioned actual 
application scenario, if it is not supported, is there any plan for the 
subsequent version? (The above scenario MyCat is supportable)
   

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


With regards,
Apache Git Services

Reply via email to