<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">master branch</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy &amp; governance</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">throw exception when creates sharding binding table rules repeatedly</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">no exception and result in duplicate metadata</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10829171/120983776-9ac77f80-c7ac-11eb-8683-0278c3716a32.png"><img src="https://user-images.githubusercontent.com/10829171/120983776-9ac77f80-c7ac-11eb-8683-0278c3716a32.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/apache/shardingsphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="https://shardingsphere.apache.org/document/current/en/overview" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response anymore and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">In the shardingsphere proxy scenario, the benchmarkSQL is running properly, and the OpenGauss does not break down.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Run benchmarkSQL in the shardingsphere proxy scenario, openGauss will crash</p>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<p dir="auto">BenchmarkSQL:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ll
total 284
-rwxrwxrwx 1 root root     30 Jun 18 17:08 .gitignore
-rw-r--r-- 1 root root      3 Sep 17 15:11 .jTPCC_run_seq.dat
-rw-r--r-- 1 root root 136218 Sep 17 15:12 benchmarksql-error.log
-rw-r--r-- 1 root root  35742 Sep 17 15:12 benchmarksql-trace.log
-rwxrwxrwx 1 root root   8515 Sep  8 20:29 config-sharding.yaml
-rwxrwxrwx 1 root root   1100 Jun 18 17:08 funcs.sh
-rwxrwxrwx 1 root root   2123 Jun 18 17:08 generateGraphs.sh
-rwxrwxrwx 1 root root   7256 Jun 18 17:08 generateReport.sh
-rwxrwxrwx 1 root root    961 Sep 13 09:56 log4j.properties
-rwxrwxrwx 1 root root    962 Jun 18 17:08 log4j.properties.bak
drwxrwxrwx 2 root root   4096 Jun 18 17:08 misc
-rwxrwxrwx 1 root root   1063 Jun 18 17:08 props.fb
-rwxrwxrwx 1 root root    947 Jun 18 17:08 props.ora
-rwxrwxrwx 1 root root   1465 Sep  8 20:54 props.pg
-rwxrwxrwx 1 root root   1335 Jun 18 17:08 props.pg.bak
-rwxrwxrwx 1 root root   1423 Sep 15 15:19 props.pg_single
-rwxrwxrwx 1 root root   1224 Sep 11 12:21 props.sharding
-rwxrwxrwx 1 root root    385 Jun 18 17:08 runBenchmark.sh
-rwxrwxrwx 1 root root    504 Jun 18 17:08 runDatabaseBuild.sh
-rwxrwxrwx 1 root root    330 Jun 18 17:08 runDatabaseDestroy.sh
-rwxrwxrwx 1 root root    200 Jun 18 17:08 runLoader.sh
-rwxrwxrwx 1 root root   1207 Jun 18 17:08 runSQL.sh
drwxrwxrwx 2 root root   4096 Sep  9 11:39 sql.common
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.firebird
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.oracle
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.postgres
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # cat props.sharding
db=postgres
driver=org.postgresql.Driver
conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
//conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?loggerLevel=OFF&amp;batchMode=OFF&amp;replication=TRUE
user=root
password=root

//warehouses=1000
warehouses=10
loadWorkers=100

//terminals=812
terminals=10
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=60
//Number of total transactions per minute
limitTxnsPerMin=0

//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=false

//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 &amp; 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4

// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
//resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
//osCollectorScript=./misc/os_collector_linux.py
//osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #

hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ./runBenchmark.sh props.sharding
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
15:11:40,832 [main] INFO   jTPCC : Term-00,
15:11:40,835 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,835 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
15:11:40,835 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,836 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
15:11:40,836 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
15:11:40,838 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
15:11:40,838 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,838 [main] INFO   jTPCC : Term-00,
15:11:40,839 [main] INFO   jTPCC : Term-00, db=postgres
15:11:40,839 [main] INFO   jTPCC : Term-00, driver=org.postgresql.Driver
15:11:40,839 [main] INFO   jTPCC : Term-00, conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:40,839 [main] INFO   jTPCC : Term-00, user=root
15:11:40,839 [main] INFO   jTPCC : Term-00,
15:11:40,840 [main] INFO   jTPCC : Term-00, warehouses=10
15:11:40,840 [main] INFO   jTPCC : Term-00, terminals=10
15:11:40,842 [main] INFO   jTPCC : Term-00, runMins=60
15:11:40,842 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=0
15:11:40,842 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=false
15:11:40,842 [main] INFO   jTPCC : Term-00,
15:11:40,843 [main] INFO   jTPCC : Term-00, newOrderWeight=45
15:11:40,843 [main] INFO   jTPCC : Term-00, paymentWeight=43
15:11:40,843 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00, deliveryWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00,
15:11:40,844 [main] INFO   jTPCC : Term-00, resultDirectory=null
15:11:40,844 [main] INFO   jTPCC : Term-00, osCollectorScript=null
15:11:40,844 [main] INFO   jTPCC : Term-00,
15:11:40,867 [main] INFO   jTPCC : Term-00, config=null
15:11:40,868 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,080 [main] INFO   jTPCC : Term-00, C value for C_LAST during load: 184
15:11:41,080 [main] INFO   jTPCC : Term-00, C value for C_LAST this run:    90
15:11:41,080 [main] INFO   jTPCC : Term-00,                                                                                                                                                                                              15:11:41,085 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,108 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,128 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,151 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,175 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,200 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,224 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,243 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,262 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,285 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off                                                                15:12:19,631 [Thread-10] ERROR  jTPCCTData : Unexpected SQLException in PAYMENTUsage: 70MB / 960MB
15:12:19,632 [Thread-10] ERROR  jTPCCTData : [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
15:12:19,632 [Thread-9] ERROR  jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,632 [Thread-7] ERROR  jTPCCTData : Unexpected SQLException in NEW_ORDER
org.postgresql.util.PSQLException: [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
15:12:19,632 [Thread-7] ERROR  jTPCCTData : [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executePayment(jTPCCTData.java:786)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,631 [Thread-4] ERROR  jTPCCTData : Unexpected SQLException in NEW_ORDER
15:12:19,633 [Thread-4] ERROR  jTPCCTData : [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
org.postgresql.util.PSQLException: [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
        at jTPCCTData.execute(jTPCCTData.java:89)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
        at jTPCCTData.execute(jTPCCTData.java:89)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,632 [Thread-5] ERROR  jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,634 [Thread-5] ERROR  jTPCCTData : [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
org.postgresql.util.PSQLException: [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
15:12:19,632 [Thread-9] ERROR  jTPCCTData : [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:126)
        at jTPCCTData.executePayment(jTPCCTData.java:741)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executePayment(jTPCCTData.java:786)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,635 [Thread-10] FATAL  jTPCCTerminal :
java.lang.NullPointerException
        at jTPCCTData.tracePayment(jTPCCTData.java:952)
        at jTPCCTData.traceScreen(jTPCCTData.java:178)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:152)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #"><pre class="notranslate"><code class="notranslate">hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ll
total 284
-rwxrwxrwx 1 root root     30 Jun 18 17:08 .gitignore
-rw-r--r-- 1 root root      3 Sep 17 15:11 .jTPCC_run_seq.dat
-rw-r--r-- 1 root root 136218 Sep 17 15:12 benchmarksql-error.log
-rw-r--r-- 1 root root  35742 Sep 17 15:12 benchmarksql-trace.log
-rwxrwxrwx 1 root root   8515 Sep  8 20:29 config-sharding.yaml
-rwxrwxrwx 1 root root   1100 Jun 18 17:08 funcs.sh
-rwxrwxrwx 1 root root   2123 Jun 18 17:08 generateGraphs.sh
-rwxrwxrwx 1 root root   7256 Jun 18 17:08 generateReport.sh
-rwxrwxrwx 1 root root    961 Sep 13 09:56 log4j.properties
-rwxrwxrwx 1 root root    962 Jun 18 17:08 log4j.properties.bak
drwxrwxrwx 2 root root   4096 Jun 18 17:08 misc
-rwxrwxrwx 1 root root   1063 Jun 18 17:08 props.fb
-rwxrwxrwx 1 root root    947 Jun 18 17:08 props.ora
-rwxrwxrwx 1 root root   1465 Sep  8 20:54 props.pg
-rwxrwxrwx 1 root root   1335 Jun 18 17:08 props.pg.bak
-rwxrwxrwx 1 root root   1423 Sep 15 15:19 props.pg_single
-rwxrwxrwx 1 root root   1224 Sep 11 12:21 props.sharding
-rwxrwxrwx 1 root root    385 Jun 18 17:08 runBenchmark.sh
-rwxrwxrwx 1 root root    504 Jun 18 17:08 runDatabaseBuild.sh
-rwxrwxrwx 1 root root    330 Jun 18 17:08 runDatabaseDestroy.sh
-rwxrwxrwx 1 root root    200 Jun 18 17:08 runLoader.sh
-rwxrwxrwx 1 root root   1207 Jun 18 17:08 runSQL.sh
drwxrwxrwx 2 root root   4096 Sep  9 11:39 sql.common
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.firebird
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.oracle
drwxrwxrwx 2 root root   4096 Jun 18 17:08 sql.postgres
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # cat props.sharding
db=postgres
driver=org.postgresql.Driver
conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
//conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?loggerLevel=OFF&amp;batchMode=OFF&amp;replication=TRUE
user=root
password=root

//warehouses=1000
warehouses=10
loadWorkers=100

//terminals=812
terminals=10
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=60
//Number of total transactions per minute
limitTxnsPerMin=0

//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=false

//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 &amp; 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4

// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
//resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
//osCollectorScript=./misc/os_collector_linux.py
//osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #

hanacockpit:/opt/benchmark/benchmarksql-ss-master/run # ./runBenchmark.sh props.sharding
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
15:11:40,832 [main] INFO   jTPCC : Term-00,
15:11:40,835 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,835 [main] INFO   jTPCC : Term-00,      BenchmarkSQL v5.0
15:11:40,835 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,836 [main] INFO   jTPCC : Term-00,  (c) 2003, Raul Barbosa
15:11:40,836 [main] INFO   jTPCC : Term-00,  (c) 2004-2016, Denis Lussier
15:11:40,838 [main] INFO   jTPCC : Term-00,  (c) 2016, Jan Wieck
15:11:40,838 [main] INFO   jTPCC : Term-00, +-------------------------------------------------------------+
15:11:40,838 [main] INFO   jTPCC : Term-00,
15:11:40,839 [main] INFO   jTPCC : Term-00, db=postgres
15:11:40,839 [main] INFO   jTPCC : Term-00, driver=org.postgresql.Driver
15:11:40,839 [main] INFO   jTPCC : Term-00, conn=jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:40,839 [main] INFO   jTPCC : Term-00, user=root
15:11:40,839 [main] INFO   jTPCC : Term-00,
15:11:40,840 [main] INFO   jTPCC : Term-00, warehouses=10
15:11:40,840 [main] INFO   jTPCC : Term-00, terminals=10
15:11:40,842 [main] INFO   jTPCC : Term-00, runMins=60
15:11:40,842 [main] INFO   jTPCC : Term-00, limitTxnsPerMin=0
15:11:40,842 [main] INFO   jTPCC : Term-00, terminalWarehouseFixed=false
15:11:40,842 [main] INFO   jTPCC : Term-00,
15:11:40,843 [main] INFO   jTPCC : Term-00, newOrderWeight=45
15:11:40,843 [main] INFO   jTPCC : Term-00, paymentWeight=43
15:11:40,843 [main] INFO   jTPCC : Term-00, orderStatusWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00, deliveryWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00, stockLevelWeight=4
15:11:40,843 [main] INFO   jTPCC : Term-00,
15:11:40,844 [main] INFO   jTPCC : Term-00, resultDirectory=null
15:11:40,844 [main] INFO   jTPCC : Term-00, osCollectorScript=null
15:11:40,844 [main] INFO   jTPCC : Term-00,
15:11:40,867 [main] INFO   jTPCC : Term-00, config=null
15:11:40,868 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,080 [main] INFO   jTPCC : Term-00, C value for C_LAST during load: 184
15:11:41,080 [main] INFO   jTPCC : Term-00, C value for C_LAST this run:    90
15:11:41,080 [main] INFO   jTPCC : Term-00,                                                                                                                                                                                              15:11:41,085 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,108 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,128 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,151 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,175 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,200 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,224 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,243 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,262 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off
15:11:41,285 [main] INFO   ShardingJdbc : create in NORMAL!!!jdbc:postgresql://90.90.169.84:3307/sharding_db?prepareThreshold=1&amp;batchMode=on&amp;fetchsize=10&amp;loggerLevel=off                                                                15:12:19,631 [Thread-10] ERROR  jTPCCTData : Unexpected SQLException in PAYMENTUsage: 70MB / 960MB
15:12:19,632 [Thread-10] ERROR  jTPCCTData : [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
15:12:19,632 [Thread-9] ERROR  jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,632 [Thread-7] ERROR  jTPCCTData : Unexpected SQLException in NEW_ORDER
org.postgresql.util.PSQLException: [90.90.169.34:40422/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
15:12:19,632 [Thread-7] ERROR  jTPCCTData : [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executePayment(jTPCCTData.java:786)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,631 [Thread-4] ERROR  jTPCCTData : Unexpected SQLException in NEW_ORDER
15:12:19,633 [Thread-4] ERROR  jTPCCTData : [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
org.postgresql.util.PSQLException: [90.90.169.34:40410/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
        at jTPCCTData.execute(jTPCCTData.java:89)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40416/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executeNewOrder(jTPCCTData.java:456)
        at jTPCCTData.execute(jTPCCTData.java:89)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:231)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,632 [Thread-5] ERROR  jTPCCTData : Unexpected SQLException in PAYMENT
15:12:19,634 [Thread-5] ERROR  jTPCCTData : [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
org.postgresql.util.PSQLException: [90.90.169.34:40412/90.90.169.84:3307] ERROR: [90.90.169.84:33786/90.90.169.82:15400] socket is not closed; Urgent packet sent to backend successfully; An I/O error occured while sending to the backend.detail:EOF Exception;
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
15:12:19,632 [Thread-9] ERROR  jTPCCTData : [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:126)
        at jTPCCTData.executePayment(jTPCCTData.java:741)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
org.postgresql.util.PSQLException: [90.90.169.34:40420/90.90.169.84:3307] ERROR: An I/O error occured while sending to the backend.
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2820)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2550)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:329)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:453)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:377)
        at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)
        at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:112)
        at jTPCCTData.executePayment(jTPCCTData.java:786)
        at jTPCCTData.execute(jTPCCTData.java:93)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:150)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
15:12:19,635 [Thread-10] FATAL  jTPCCTerminal :
java.lang.NullPointerException
        at jTPCCTData.tracePayment(jTPCCTData.java:952)
        at jTPCCTData.traceScreen(jTPCCTData.java:178)
        at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:152)
        at jTPCCTerminal.run(jTPCCTerminal.java:86)
        at java.lang.Thread.run(Thread.java:748)
hanacockpit:/opt/benchmark/benchmarksql-ss-master/run #
</code></pre></div>
<p dir="auto">Shardingsphere-proxy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[omm@sharding01 conf]$ pwd
/home/omm/apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin/conf
[omm@sharding01 conf]$ ll
total 68K
-rwxrwxrwx 1 omm dbgrp 4.1K Sep  6 10:31 config-database-discovery.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep  6 10:31 config-encrypt.yaml
-rwxrwxrwx 1 omm dbgrp 3.7K Sep  6 10:31 config-readwrite-splitting.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep  6 10:31 config-shadow.yaml
-rwxrwxrwx 1 omm dbgrp 7.7K Sep 17 14:54 config-sharding.yaml
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.20210916
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.4pcs
-rwxrwxrwx 1 omm dbgrp 5.3K Sep  6 10:31 config-sharding.yaml.bak
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 13 17:24 logback.xml
-rwxrwxrwx 1 omm dbgrp 1.4K Sep  6 10:31 logback.xml.bak
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 15 10:34 server.yaml
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 11 09:47 server.yaml.bak
[omm@sharding01 conf]$
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat config-sharding.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the &quot;License&quot;); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of sharding rule.
#
######################################################################################################

schemaName: sharding_db

dataSources:
  ds_0:
#   url: jdbc:postgresql://90.90.169.81:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    url: jdbc:opengauss://90.90.169.81:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    username: tpcc
    password: Huawei_123
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 900
  ds_1:
#   url: jdbc:postgresql://90.90.169.82:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    url: jdbc:opengauss://90.90.169.82:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    username: tpcc
    password: Huawei_123
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 900

rules:
- !SHARDING
  tables:
    bmsql_config:
      actualDataNodes: ds_${0..1}.bmsql_config
      databaseStrategy:
        standard:
          shardingAlgorithmName: ds_bmsql_config_inline
          shardingColumn: cfg_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_item:
      actualDataNodes: ds_${0..1}.bmsql_item
      databaseStrategy:
        standard:
          shardingAlgorithmName: ds_bmsql_item_inline
          shardingColumn: i_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

  bindingTables:
  - bmsql_warehouse, bmsql_customer
  - bmsql_stock, bmsql_district, bmsql_order_line
  defaultDatabaseStrategy:
    none: null
  defaultTableStrategy:
    none: null

  shardingAlgorithms:
    database_inline:
      props:
        algorithm-expression: ds_${user_id % 2}
      type: INLINE
    ds_bmsql_config_inline:
      props:
        algorithm-expression: ds_${cfg_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_item_inline:
      props:
        algorithm-expression: ds_${i_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

  keyGenerators:
    snowflake:
      type: SNOWFLAKE
      props:
        worker-id: 123


######################################################################################################
#
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
#
######################################################################################################

#schemaName: sharding_db
#
#dataSources:
#  ds_0:
#    url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&amp;useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 30000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#  ds_1:
#    url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&amp;useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 30000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#
#rules:
#- !SHARDING
#  tables:
#    t_order:
#      actualDataNodes: ds_${0..1}.t_order_${0..1}
#      tableStrategy:
#        standard:
#          shardingColumn: order_id
#          shardingAlgorithmName: t_order_inline
#      keyGenerateStrategy:
#        column: order_id
#        keyGeneratorName: snowflake
#    t_order_item:
#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
#      tableStrategy:
#        standard:
#          shardingColumn: order_id
#          shardingAlgorithmName: t_order_item_inline
#      keyGenerateStrategy:
#        column: order_item_id
#        keyGeneratorName: snowflake
#  bindingTables:
#    - t_order,t_order_item
#  defaultDatabaseStrategy:
#    standard:
#      shardingColumn: user_id
#      shardingAlgorithmName: database_inline
#  defaultTableStrategy:
#    none:
#
#  shardingAlgorithms:
#    database_inline:
#      type: INLINE
#      props:
#        algorithm-expression: ds_${user_id % 2}
#    t_order_inline:
#      type: INLINE
#      props:
#        algorithm-expression: t_order_${order_id % 2}
#    t_order_item_inline:
#      type: INLINE
#      props:
#        algorithm-expression: t_order_item_${order_id % 2}
#
#  keyGenerators:
#    snowflake:
#      type: SNOWFLAKE
#      props:
#        worker-id: 123
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat server.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the &quot;License&quot;); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

######################################################################################################
#
# If you want to configure governance, authorization and proxy properties, please refer to this file.
#
######################################################################################################

#mode:
#  type: Cluster
#  repository:
#    type: ZooKeeper
#    props:
#      namespace: governance_ds
#      server-lists: localhost:2181
#      retryIntervalMilliseconds: 500
#      timeToLiveSeconds: 60
#      maxRetries: 3
#      operationTimeoutMilliseconds: 500
#  overwrite: false

rules:
  - !AUTHORITY
    users:
      - root@%:root
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED
#  - !TRANSACTION
#    defaultType: XA
#    providerType: Atomikos


#scaling:
#  blockQueueSize: 10000
#  workerThread: 40
#  clusterAutoSwitchAlgorithm:
#    type: IDLE
#    props:
#      incremental-task-idle-minute-threshold: 30

props:
  max-connections-size-per-query: 1
  executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: false
  sql-show: true
  check-table-metadata-enabled: false
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
    # 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
  check-duplicate-table-enabled: false
[omm@sharding01 conf]$"><pre class="notranslate"><code class="notranslate">[omm@sharding01 conf]$ pwd
/home/omm/apache-shardingsphere-5.0.0-RC1-SNAPSHOT-shardingsphere-proxy-bin/conf
[omm@sharding01 conf]$ ll
total 68K
-rwxrwxrwx 1 omm dbgrp 4.1K Sep  6 10:31 config-database-discovery.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep  6 10:31 config-encrypt.yaml
-rwxrwxrwx 1 omm dbgrp 3.7K Sep  6 10:31 config-readwrite-splitting.yaml
-rwxrwxrwx 1 omm dbgrp 3.0K Sep  6 10:31 config-shadow.yaml
-rwxrwxrwx 1 omm dbgrp 7.7K Sep 17 14:54 config-sharding.yaml
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.20210916
-rwxrwxrwx 1 omm dbgrp 7.6K Sep 11 11:29 config-sharding.yaml.4pcs
-rwxrwxrwx 1 omm dbgrp 5.3K Sep  6 10:31 config-sharding.yaml.bak
-rwxrwxrwx 1 omm dbgrp 1.4K Sep 13 17:24 logback.xml
-rwxrwxrwx 1 omm dbgrp 1.4K Sep  6 10:31 logback.xml.bak
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 15 10:34 server.yaml
-rwxrwxrwx 1 omm dbgrp 2.4K Sep 11 09:47 server.yaml.bak
[omm@sharding01 conf]$
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat config-sharding.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

######################################################################################################
#
# Here you can configure the rules for the proxy.
# This example is configuration of sharding rule.
#
######################################################################################################

schemaName: sharding_db

dataSources:
  ds_0:
#   url: jdbc:postgresql://90.90.169.81:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    url: jdbc:opengauss://90.90.169.81:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    username: tpcc
    password: Huawei_123
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 900
  ds_1:
#   url: jdbc:postgresql://90.90.169.82:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    url: jdbc:opengauss://90.90.169.82:15400/tpccdb?serverTimezone=UTC&amp;useSSL=false
    username: tpcc
    password: Huawei_123
    connectionTimeoutMilliseconds: 30000
    idleTimeoutMilliseconds: 60000
    maxLifetimeMilliseconds: 1800000
    maxPoolSize: 2000
    minPoolSize: 900

rules:
- !SHARDING
  tables:
    bmsql_config:
      actualDataNodes: ds_${0..1}.bmsql_config
      databaseStrategy:
        standard:
          shardingAlgorithmName: ds_bmsql_config_inline
          shardingColumn: cfg_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_item:
      actualDataNodes: ds_${0..1}.bmsql_item
      databaseStrategy:
        standard:
          shardingAlgorithmName: ds_bmsql_item_inline
          shardingColumn: i_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

  bindingTables:
  - bmsql_warehouse, bmsql_customer
  - bmsql_stock, bmsql_district, bmsql_order_line
  defaultDatabaseStrategy:
    none: null
  defaultTableStrategy:
    none: null

  shardingAlgorithms:
    database_inline:
      props:
        algorithm-expression: ds_${user_id % 2}
      type: INLINE
    ds_bmsql_config_inline:
      props:
        algorithm-expression: ds_${cfg_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_item_inline:
      props:
        algorithm-expression: ds_${i_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

  keyGenerators:
    snowflake:
      type: SNOWFLAKE
      props:
        worker-id: 123


######################################################################################################
#
# If you want to connect to MySQL, you should manually copy MySQL driver to lib directory.
#
######################################################################################################

#schemaName: sharding_db
#
#dataSources:
#  ds_0:
#    url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&amp;useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 30000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#  ds_1:
#    url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&amp;useSSL=false
#    username: root
#    password:
#    connectionTimeoutMilliseconds: 30000
#    idleTimeoutMilliseconds: 60000
#    maxLifetimeMilliseconds: 1800000
#    maxPoolSize: 50
#    minPoolSize: 1
#
#rules:
#- !SHARDING
#  tables:
#    t_order:
#      actualDataNodes: ds_${0..1}.t_order_${0..1}
#      tableStrategy:
#        standard:
#          shardingColumn: order_id
#          shardingAlgorithmName: t_order_inline
#      keyGenerateStrategy:
#        column: order_id
#        keyGeneratorName: snowflake
#    t_order_item:
#      actualDataNodes: ds_${0..1}.t_order_item_${0..1}
#      tableStrategy:
#        standard:
#          shardingColumn: order_id
#          shardingAlgorithmName: t_order_item_inline
#      keyGenerateStrategy:
#        column: order_item_id
#        keyGeneratorName: snowflake
#  bindingTables:
#    - t_order,t_order_item
#  defaultDatabaseStrategy:
#    standard:
#      shardingColumn: user_id
#      shardingAlgorithmName: database_inline
#  defaultTableStrategy:
#    none:
#
#  shardingAlgorithms:
#    database_inline:
#      type: INLINE
#      props:
#        algorithm-expression: ds_${user_id % 2}
#    t_order_inline:
#      type: INLINE
#      props:
#        algorithm-expression: t_order_${order_id % 2}
#    t_order_item_inline:
#      type: INLINE
#      props:
#        algorithm-expression: t_order_item_${order_id % 2}
#
#  keyGenerators:
#    snowflake:
#      type: SNOWFLAKE
#      props:
#        worker-id: 123
[omm@sharding01 conf]$
[omm@sharding01 conf]$ cat server.yaml
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

######################################################################################################
#
# If you want to configure governance, authorization and proxy properties, please refer to this file.
#
######################################################################################################

#mode:
#  type: Cluster
#  repository:
#    type: ZooKeeper
#    props:
#      namespace: governance_ds
#      server-lists: localhost:2181
#      retryIntervalMilliseconds: 500
#      timeToLiveSeconds: 60
#      maxRetries: 3
#      operationTimeoutMilliseconds: 500
#  overwrite: false

rules:
  - !AUTHORITY
    users:
      - root@%:root
      - sharding@:sharding
    provider:
      type: ALL_PRIVILEGES_PERMITTED
#  - !TRANSACTION
#    defaultType: XA
#    providerType: Atomikos


#scaling:
#  blockQueueSize: 10000
#  workerThread: 40
#  clusterAutoSwitchAlgorithm:
#    type: IDLE
#    props:
#      incremental-task-idle-minute-threshold: 30

props:
  max-connections-size-per-query: 1
  executor-size: 16  # Infinite by default.
  proxy-frontend-flush-threshold: 128  # The default value is 128.
  proxy-opentracing-enabled: false
  proxy-hint-enabled: false
  sql-show: true
  check-table-metadata-enabled: false
  lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
    # 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
  check-duplicate-table-enabled: false
[omm@sharding01 conf]$
</code></pre></div>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>