<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">shardingjdbc4.1.1</p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-JDBC</p>
<h3 dir="auto">bug</h3>
<p dir="auto">Distributed system snowflake algorithm duplicate ID</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
### The error may involve com.dongao.phoenix.biz.study.manage.mapper.MsPushRecordLinkPoMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into biz_ms_push_record_link (ms_push_record_id, type, create_date, update_date, member_ids, device_tokens ) values (?, ?, ?, ?, ?, ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
; SQL []; Duplicate entry '624998537125429249' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY' org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
### The error may involve com.dongao.phoenix.biz.study.manage.mapper.MsPushRecordLinkPoMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into biz_ms_push_record_link (ms_push_record_id, type, create_date, update_date, member_ids, device_tokens ) values (?, ?, ?, ?, ?, ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'"><pre class="notranslate"><code class="notranslate">### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
### The error may involve com.dongao.phoenix.biz.study.manage.mapper.MsPushRecordLinkPoMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into biz_ms_push_record_link (ms_push_record_id, type, create_date, update_date, member_ids, device_tokens ) values (?, ?, ?, ?, ?, ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
; SQL []; Duplicate entry '624998537125429249' for key 'PRIMARY'; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY' org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
### The error may involve com.dongao.phoenix.biz.study.manage.mapper.MsPushRecordLinkPoMapper.insert-Inline
### The error occurred while setting parameters
### SQL: insert into biz_ms_push_record_link (ms_push_record_id, type, create_date, update_date, member_ids, device_tokens ) values (?, ?, ?, ?, ?, ? )
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '624998537125429249' for key 'PRIMARY'
</code></pre></div>
<h3 dir="auto">configuration</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;bean id=&quot;msPushShardingAlgorithm&quot; class=&quot;com.xx.phoenix.biz.study.manage.config.MsPushShardingAlgorithm&quot; /&gt;
	&lt;sharding:standard-strategy id=&quot;pushTableStrategy&quot; sharding-column=&quot;create_date&quot; precise-algorithm-ref=&quot;msPushShardingAlgorithm&quot; range-algorithm-ref=&quot;msPushShardingAlgorithm&quot;/&gt;
	&lt;sharding:key-generator id=&quot;idKeyGenerator&quot; type=&quot;SNOWFLAKE&quot; column=&quot;id&quot;/&gt;

	&lt;sharding:data-source id=&quot;shardingDataSource&quot;&gt;
		&lt;sharding:sharding-rule data-source-names=&quot;ds1&quot;&gt;
			&lt;sharding:table-rules&gt;
				&lt;sharding:table-rule logic-table=&quot;biz_ms_push&quot;
									 actual-data-nodes=&quot;ds1.biz_ms_push_20$-&gt;{21..25}&quot;
									 table-strategy-ref=&quot;pushTableStrategy&quot; key-generator-ref=&quot;idKeyGenerator&quot;  /&gt;
				&lt;sharding:table-rule logic-table=&quot;biz_ms_push_record&quot;
									 actual-data-nodes=&quot;ds1.biz_ms_push_record_20$-&gt;{21..25}&quot;
									 table-strategy-ref=&quot;pushTableStrategy&quot; key-generator-ref=&quot;idKeyGenerator&quot;  /&gt;
				&lt;sharding:table-rule logic-table=&quot;biz_ms_push_record_link&quot;
									 actual-data-nodes=&quot;ds1.biz_ms_push_record_link_20$-&gt;{21..25}&quot;
									 table-strategy-ref=&quot;pushTableStrategy&quot; key-generator-ref=&quot;idKeyGenerator&quot;  /&gt;
			&lt;/sharding:table-rules&gt;
			&lt;sharding:binding-table-rules&gt;
				&lt;sharding:binding-table-rule logic-tables=&quot;biz_ms_push_record&quot; /&gt;
			&lt;/sharding:binding-table-rules&gt;
		&lt;/sharding:sharding-rule&gt;
		&lt;sharding:props&gt;
			&lt;prop key=&quot;sql.show&quot;&gt;true&lt;/prop&gt;
		&lt;/sharding:props&gt;
	&lt;/sharding:data-source&gt;"><pre class="notranslate"><code class="notranslate">&lt;bean id="msPushShardingAlgorithm" class="com.xx.phoenix.biz.study.manage.config.MsPushShardingAlgorithm" /&gt;
	&lt;sharding:standard-strategy id="pushTableStrategy" sharding-column="create_date" precise-algorithm-ref="msPushShardingAlgorithm" range-algorithm-ref="msPushShardingAlgorithm"/&gt;
	&lt;sharding:key-generator id="idKeyGenerator" type="SNOWFLAKE" column="id"/&gt;

	&lt;sharding:data-source id="shardingDataSource"&gt;
		&lt;sharding:sharding-rule data-source-names="ds1"&gt;
			&lt;sharding:table-rules&gt;
				&lt;sharding:table-rule logic-table="biz_ms_push"
									 actual-data-nodes="ds1.biz_ms_push_20$-&gt;{21..25}"
									 table-strategy-ref="pushTableStrategy" key-generator-ref="idKeyGenerator"  /&gt;
				&lt;sharding:table-rule logic-table="biz_ms_push_record"
									 actual-data-nodes="ds1.biz_ms_push_record_20$-&gt;{21..25}"
									 table-strategy-ref="pushTableStrategy" key-generator-ref="idKeyGenerator"  /&gt;
				&lt;sharding:table-rule logic-table="biz_ms_push_record_link"
									 actual-data-nodes="ds1.biz_ms_push_record_link_20$-&gt;{21..25}"
									 table-strategy-ref="pushTableStrategy" key-generator-ref="idKeyGenerator"  /&gt;
			&lt;/sharding:table-rules&gt;
			&lt;sharding:binding-table-rules&gt;
				&lt;sharding:binding-table-rule logic-tables="biz_ms_push_record" /&gt;
			&lt;/sharding:binding-table-rules&gt;
		&lt;/sharding:sharding-rule&gt;
		&lt;sharding:props&gt;
			&lt;prop key="sql.show"&gt;true&lt;/prop&gt;
		&lt;/sharding:props&gt;
	&lt;/sharding:data-source&gt;
</code></pre></div>
<h2 dir="auto">Question</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before asking a question, make sure you have:</p>
<ul dir="auto">
<li>Googled your question.</li>
<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>
<h2 dir="auto"><strong>Hi, when I batch insert  data into  the table through ShardingSphere-proxy-v5.2.1，I will be prompted with the following exception. However ,it is normal to directly insert into the table without the proxy.</strong></h2>
<p dir="auto">Did I configure something wrong ?  HELP ~</p>
<p dir="auto"><strong>Note: I have tried to increase the value of sqlStatementCache in server.yaml</strong></p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="2022/10/28 04:00:46 - ERROR (version 9.3.0.0-428, build 9.3.0.0-428 from 2022-04-12 04.56.25 by buildguy) : org.pentaho.di.core.exception.KettleException: 
2022/10/28 04:00:46 -  Error batch inserting rows into table [t_accounts].
2022/10/28 04:00:46 - Errors encountered (first 10):
2022/10/28 04:00:46 - 
2022/10/28 04:00:46 - 
2022/10/28 04:00:46 - Error updating batch
2022/10/28 04:00:46 - Parameter index out of bounds. 60177 is not between valid values of 1 and 60176
2022/10/28 04:00:46 - 
2022/10/28 04:00:46 -
2022/10/28 04:00:46 -         at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:348)
2022/10/28 04:00:46 -         at org.pentaho.di.trans.steps.tableoutput.TableOutput.processRow(TableOutput.java:125)
2022/10/28 04:00:46 -         at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2022/10/28 04:00:46 -         at java.lang.Thread.run(Thread.java:750)
2022/10/28 04:00:46 - Caused by: org.pentaho.di.core.exception.KettleDatabaseBatchException: 
2022/10/28 04:00:46 - Error updating batch
"><pre class="notranslate"><span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-en">ERROR</span> (<span class="pl-s1">version</span> <span class="pl-c1">9.3</span><span class="pl-c1">.0</span><span class="pl-c1">.0</span>-<span class="pl-c1">428</span>, <span class="pl-s1">build</span> <span class="pl-c1">9.3</span><span class="pl-c1">.0</span><span class="pl-c1">.0</span>-<span class="pl-c1">428</span> <span class="pl-s1">from</span> <span class="pl-c1">2022</span>-<span class="pl-c1">04</span>-<span class="pl-c1">12</span> <span class="pl-c1">04.56</span><span class="pl-c1">.25</span> <span class="pl-s1">by</span> <span class="pl-s1">buildguy</span>) : <span class="pl-smi">org</span>.<span class="pl-smi">pentaho</span>.<span class="pl-smi">di</span>.<span class="pl-smi">core</span>.<span class="pl-smi">exception</span>.<span class="pl-smi">KettleException</span>: 
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -  <span class="pl-smi">Error</span> <span class="pl-s1">batch</span> <span class="pl-smi">inserting</span> <span class="pl-s1">rows</span> <span class="pl-smi">into</span> <span class="pl-s1">table</span> [<span class="pl-s1">t_accounts</span>].
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-smi">Errors</span> <span class="pl-en">encountered</span> (<span class="pl-s1">first</span> <span class="pl-c1">10</span>):
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - 
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - 
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-smi">Error</span> <span class="pl-s1">updating</span> <span class="pl-s1">batch</span>
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-smi">Parameter</span> <span class="pl-s1">index</span> <span class="pl-s1">out</span> <span class="pl-s1">of</span> <span class="pl-smi">bounds</span>. <span class="pl-c1">60177</span> <span class="pl-smi">is</span> <span class="pl-s1">not</span> <span class="pl-smi">between</span> <span class="pl-s1">valid</span> <span class="pl-smi">values</span> <span class="pl-s1">of</span> <span class="pl-c1">1</span> <span class="pl-s1">and</span> <span class="pl-c1">60176</span>
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - 
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -         <span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">pentaho</span>.<span class="pl-s1">di</span>.<span class="pl-s1">trans</span>.<span class="pl-s1">steps</span>.<span class="pl-s1">tableoutput</span>.<span class="pl-s1">TableOutput</span>.<span class="pl-en">writeToTable</span>(<span class="pl-smi">TableOutput</span>.<span class="pl-smi">java</span>:<span class="pl-c1">348</span>)
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -         <span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">pentaho</span>.<span class="pl-s1">di</span>.<span class="pl-s1">trans</span>.<span class="pl-s1">steps</span>.<span class="pl-s1">tableoutput</span>.<span class="pl-s1">TableOutput</span>.<span class="pl-en">processRow</span>(<span class="pl-smi">TableOutput</span>.<span class="pl-smi">java</span>:<span class="pl-c1">125</span>)
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -         <span class="pl-smi">at</span> <span class="pl-s1">org</span>.<span class="pl-s1">pentaho</span>.<span class="pl-s1">di</span>.<span class="pl-s1">trans</span>.<span class="pl-s1">step</span>.<span class="pl-s1">RunThread</span>.<span class="pl-en">run</span>(<span class="pl-smi">RunThread</span>.<span class="pl-smi">java</span>:<span class="pl-c1">62</span>)
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> -         <span class="pl-smi">at</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">Thread</span>.<span class="pl-en">run</span>(<span class="pl-smi">Thread</span>.<span class="pl-smi">java</span>:<span class="pl-c1">750</span>)
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-smi">Caused</span> <span class="pl-s1">by</span>: <span class="pl-smi">org</span>.<span class="pl-smi">pentaho</span>.<span class="pl-smi">di</span>.<span class="pl-smi">core</span>.<span class="pl-smi">exception</span>.<span class="pl-smi">KettleDatabaseBatchException</span>: 
<span class="pl-c1">2022</span>/<span class="pl-c1">10</span>/<span class="pl-c1">28</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">46</span> - <span class="pl-smi">Error</span> <span class="pl-s1">updating</span> <span class="pl-s1">batch</span></pre></div>