peilinqian opened a new issue, #22412: URL: https://github.com/apache/shardingsphere/issues/22412
### Which version of ShardingSphere did you use? we find java version: java8, full_version=1.8.0_342, full_path=/home/peilq_sharding/bisheng-jdk1.8.0_342//bin/java ShardingSphere-5.2.2-SNAPSHOT Commit ID: dirty-753c0cee8ee6fd3db00536da55b64bc5198a3758 Commit Message: Optimize sqlFederationExecutor init logic when sqlFederationType modify dynamically (https://github.com/apache/shardingsphere/pull/22209) Branch: https://github.com/apache/shardingsphere/commit/753c0cee8ee6fd3db00536da55b64bc5198a3758 Build time: 2022-11-19T10:18:41+0800 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior Use TPCC to runDatabaseBuild ,execute success ### Actual behavior Use TPCC to runDatabaseBuild ,returning error ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. 1、. runDatabaseDestroy.sh props.proxy ``` …… # ------------------------------------------------------------ # Loading SQL file ./sql.common/foreignKeys.sql # ------------------------------------------------------------ alter table bmsql_district add constraint d_warehouse_fkey foreign key (d_w_id) references bmsql_warehouse (w_id); alter table bmsql_customer add constraint c_district_fkey foreign key (c_w_id, c_d_id) references bmsql_district (d_w_id, d_id); alter table bmsql_history add constraint h_customer_fkey foreign key (h_c_w_id, h_c_d_id, h_c_id) references bmsql_customer (c_w_id, c_d_id, c_id); alter table bmsql_history add constraint h_district_fkey foreign key (h_w_id, h_d_id) references bmsql_district (d_w_id, d_id); alter table bmsql_new_order add constraint no_order_fkey foreign key (no_w_id, no_d_id, no_o_id) references bmsql_oorder (o_w_id, o_d_id, o_id); alter table bmsql_oorder add constraint o_customer_fkey foreign key (o_w_id, o_d_id, o_c_id) references bmsql_customer (c_w_id, c_d_id, c_id); alter table bmsql_order_line add constraint ol_order_fkey foreign key (ol_w_id, ol_d_id, ol_o_id) references bmsql_oorder (o_w_id, o_d_id, o_id); alter table bmsql_order_line add constraint ol_stock_fkey foreign key (ol_supply_w_id, ol_i_id) references bmsql_stock (s_w_id, s_i_id); alter table bmsql_stock add constraint s_warehouse_fkey foreign key (s_w_id) references bmsql_warehouse (w_id); alter table bmsql_stock add constraint s_item_fkey foreign key (s_i_id) references bmsql_item (i_id); [90.90.44.175:36010/90.90.44.175:11000] ERROR: insert or update on table "bmsql_stock" violates foreign key constraint "s_item_fkey_bmsql_stock" Detail: Key (s_i_id)=(2) is not present in table "bmsql_item". # ------------------------------------------------------------ # Loading SQL file ./sql.postgres/buildFinish.sql # ------------------------------------------------------------ -- ---- -- Extra commands to run after the tables are created, loaded, -- indexes built and extra's created. -- PostgreSQL version. -- ---- vacuum analyze; ``` ### Example codes for reproduce this issue (such as a github link). ``` schemaName: tpcc_db dataSources: ds_0: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Huawei@123 url: jdbc:opengauss://90.90.44.171:14000/tpccdb?batchMode=on username: tpccuser ds_1: connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 260 minPoolSize: 10 password: Huawei@123 url: jdbc:opengauss://90.90.44.171:15000/tpccdb?batchMode=on username: tpccuser rules: - !SHARDING bindingTables: - bmsql_warehouse, bmsql_customer - bmsql_stock, bmsql_district, bmsql_order_line defaultDatabaseStrategy: standard: shardingAlgorithmName: database_inline shardingColumn: ds_id defaultTableStrategy: none: null shardingAlgorithms: database_inline: props: algorithm-expression: ds_${ds_id % 1} type: INLINE ds_bmsql_item_inline: props: algorithm-expression: ds_${i_id % 2} type: INLINE ds_bmsql_customer_inline: props: algorithm-expression: ds_${c_w_id % 2} type: INLINE ds_bmsql_district_inline: props: algorithm-expression: ds_${d_w_id % 2} type: INLINE ds_bmsql_history_inline: props: algorithm-expression: ds_${h_w_id % 2} type: INLINE ds_bmsql_new_order_inline: props: algorithm-expression: ds_${no_w_id % 2} type: INLINE ds_bmsql_oorder_inline: props: algorithm-expression: ds_${o_w_id % 2} type: INLINE ds_bmsql_order_line_inline: props: algorithm-expression: ds_${ol_w_id % 2} type: INLINE ds_bmsql_stock_inline: props: algorithm-expression: ds_${s_w_id % 2} type: INLINE ds_bmsql_warehouse_inline: props: algorithm-expression: ds_${w_id % 2} type: INLINE tables: bmsql_config: actualDataNodes: ds_0.bmsql_config bmsql_item: actualDataNodes: ds_${0..1}.bmsql_item databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_item_inline shardingColumn: i_id bmsql_customer: actualDataNodes: ds_${0..1}.bmsql_customer databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_customer_inline shardingColumn: c_w_id bmsql_district: actualDataNodes: ds_${0..1}.bmsql_district databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_district_inline shardingColumn: d_w_id bmsql_history: actualDataNodes: ds_${0..1}.bmsql_history databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_history_inline shardingColumn: h_w_id bmsql_new_order: actualDataNodes: ds_${0..1}.bmsql_new_order databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_new_order_inline shardingColumn: no_w_id bmsql_oorder: actualDataNodes: ds_${0..1}.bmsql_oorder databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_oorder_inline shardingColumn: o_w_id bmsql_order_line: actualDataNodes: ds_${0..1}.bmsql_order_line databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_order_line_inline shardingColumn: ol_w_id bmsql_stock: actualDataNodes: ds_${0..1}.bmsql_stock databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_stock_inline shardingColumn: s_w_id bmsql_warehouse: actualDataNodes: ds_${0..1}.bmsql_warehouse databaseStrategy: standard: shardingAlgorithmName: ds_bmsql_warehouse_inline shardingColumn: w_id ``` ``` mode: type: Cluster repository: type: ZooKeeper props: namespace: governance_ds server-lists: 90.90.44.175:2181 retryIntervalMilliseconds: 500 timeToLiveSeconds: 60 maxRetries: 3 operationTimeoutMilliseconds: 500 authority: users: - user: root@% password: root - user: sharding password: sharding privilege: type: ALL_PERMITTED #rules: #- !TRANSACTION # defaultType: XA # providerType: Atomikos #- !SQL_PARSER # sqlCommentParseEnabled: true # sqlStatementCache: # initialCapacity: 2000 # maximumSize: 65535 # parseTreeCache: # initialCapacity: 128 # maximumSize: 1024 props: # max-connections-size-per-query: 1 # kernel-executor-size: 16 # Infinite by default. # proxy-frontend-flush-threshold: 128 # The default value is 128. # proxy-hint-enabled: false sql-show: true # check-table-metadata-enabled: false # # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy. # # The default value is -1, which means set the minimum value for different JDBC drivers. # proxy-backend-query-fetch-size: -1 # proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide. # # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution # # and block other clients if client connections are more than `proxy-frontend-executor-size`, especially executing slow SQL. # proxy-backend-executor-suitable: OLAP # proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation. # # Available sql federation type: NONE (default), ORIGINAL, ADVANCED sql-federation-type: ADVANCED ``` -- 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]
