You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/09/08 11:01:22 UTC

[GitHub] [shardingsphere] qiuxiaotong2021 opened a new issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

qiuxiaotong2021 opened a new issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293


   ## Bug Report
   
   hi, i'm glad you can pay attention to my problem, thanks.
   
   - my env:
   1>sharding-jdbc 5.0 beta
   2>springboot JPA, mysql8.0
   
   - application.properties core:
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=order-volume-range-table
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.type=VOLUME_RANGE
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-lower=5
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-upper=10
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.sharding-volume=5
   
   - runtime error message:
   Logic SQL: insert into t_order (mobile, status, user_id) values (?, ?, ?)
   Actual SQL: ds-0 ::: insert into org.apache.shardingsphere.sharding.rewrite.token.pojo.TableToken@1bd98c48 (mobile, status, user_id, order_id) values org.apache.shardingsphere.sharding.rewrite.token.pojo.ShardingInsertValuesToken@5d9ccad2 ::: [19921400087, finish, 1, 642431285872537600]
   
   - more stack message:
   
   java.lang.reflect.UndeclaredThrowableException
   	at com.sun.proxy.$Proxy196.persist(Unknown Source)
   	at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:554)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.data.repository.core.support.ImplementationInvocationMetadata.invoke(ImplementationInvocationMetadata.java:72)
   	at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:382)
   	at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:205)
   	at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:550)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:155)
   	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:130)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:80)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:178)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
   	at com.sun.proxy.$Proxy200.save(Unknown Source)
   	at com.catfish.sharding.jpa.service.OrderService.create(OrderService.java:39)
   	at com.catfish.sharding.jpa.service.OrderService$$FastClassBySpringCGLIB$$906052f0.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
   	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
   	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
   	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
   	at com.catfish.sharding.jpa.service.OrderService$$EnhancerBySpringCGLIB$$46cde09f.create(<generated>)
   	at com.catfish.sharding.OrderServiceTest.testCreate(OrderServiceTest.java:51)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
   	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
   	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
   	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
   	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
   	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
   	at java.util.ArrayList.forEach(ArrayList.java:1257)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
   	at java.util.ArrayList.forEach(ArrayList.java:1257)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
   	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
   	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
   	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
   	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
   	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
   	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
   	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
   	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
   	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
   	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
   	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
   	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
   	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
   	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
   	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
   Caused by: java.lang.reflect.InvocationTargetException
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.shardingsphere.driver.jdbc.adapter.invocation.JdbcMethodInvocation.invoke(JdbcMethodInvocation.java:45)
   	at org.apache.shardingsphere.driver.jdbc.adapter.AbstractPreparedStatementAdapter.lambda$replaySetParameter$0(AbstractPreparedStatementAdapter.java:281)
   	at java.lang.Iterable.forEach(Iterable.java:75)
   	at org.apache.shardingsphere.driver.jdbc.adapter.AbstractPreparedStatementAdapter.replaySetParameter(AbstractPreparedStatementAdapter.java:281)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.replaySetParameter(ShardingSpherePreparedStatement.java:397)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.replay(ShardingSpherePreparedStatement.java:391)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.cacheStatements(ShardingSpherePreparedStatement.java:387)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:235)
   	at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
   	at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57)
   	at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:43)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3196)
   	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3802)
   	at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:84)
   	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:645)
   	at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:282)
   	at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:263)
   	at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:317)
   	at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:330)
   	at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:287)
   	at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:193)
   	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
   	at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:185)
   	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:128)
   	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:55)
   	at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:99)
   	at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:720)
   	at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:706)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:314)
   	... 103 more
   Caused by: java.sql.SQLException: Parameter index out of range (1 > number of parameters, which is 0).
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
   	at com.mysql.cj.jdbc.ClientPreparedStatement.checkBounds(ClientPreparedStatement.java:1373)
   	at com.mysql.cj.jdbc.ClientPreparedStatement.getCoreParameterIndex(ClientPreparedStatement.java:1386)
   	at com.mysql.cj.jdbc.ClientPreparedStatement.setObject(ClientPreparedStatement.java:1670)
   	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setObject(HikariProxyPreparedStatement.java)
   	... 140 more
   
   
   
   How can this problem be solved? help!
   
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-929868712


   > @qiuxiaotong2021 I saw your properties
   > 
   > ```
   > spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
   > spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=order-volume-range-table
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.type=VOLUME_RANGE
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-lower=5
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-upper=10
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.sharding-volume=5
   > ```
   > 
   > this will make the range to `-∞,5), [5,10),[10,+∞) ` and you sharding key is `order_id` , So it'll sharding to t_order_2 , but it is not exist. Refer to `AbstractRangeShardingAlgorithm`
   
   According to @tuichenchuxin  investigation, it can be seen that there is no problem with the `VOLUME_RANGE` algorithm, so I will close this issue.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-918723610


   @RaigorJiang  
   Sorry for the delay reply.
   OK, my problem is still not solved. I will upload to github with module in time this afternoon pm 15:00, but I'm still communicating the needs of customers on site. 
   Thanks for u help.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 edited a comment on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 edited a comment on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-918723610


   @RaigorJiang  
   Sorry for the delay reply.
   OK, my problem is still not solved. I will upload to github with module in time this afternoon pm 15:00, and push the url to you, but I'm still communicating the needs of customers on site. 
   Thanks for u help.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-915718395


   @RaigorJiang
   com.zaxxer.hikari.HikariDataSource
   com.mysql.cj.jdbc.Driver
   mysql-connector-java: 8.0.25


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-917911558


   @qiuxiaotong2021  
   Can you try the master branch?
   If your problem is still not solved, can you provide a project on github for us to debug?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-918746486


   > Thanks for u help.
   
   You are welcome.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-920120347


   @RaigorJiang 
   
   Sorry for coming so late, There are other projects being handled recently.
   Now I'm free.
   My code:
   https://github.com/qiuxiaotong2021/catfish-sharding.git
   
   Thanks very much.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-917774233


   @qiuxiaotong2021 
   Sorry, it took some time but the problem has not been reproduced, so I have not given you feedback. 
   I will try another way today.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-920690944


   @qiuxiaotong2021  
   I reproduced the problem with your demo project, now @strongduanmu will help us.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-917753943


   Hi @RaigorJiang , good morning,  It has any updated? 
   If it is fixed in the next version, I will close the issue as soon as possible.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu closed issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-915710178


   @qiuxiaotong2021 
   What is your version of `mysql-connector-java`?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuichenchuxin commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-921418671


   @qiuxiaotong2021 
   I saw your properties
   ```
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=order-volume-range-table
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.type=VOLUME_RANGE
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-lower=5
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-upper=10
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.sharding-volume=5
   ```
   this will make the range to `-∞,5), [5,10),[10,+∞) ` and you sharding key is `order_id` , So it'll sharding to t_order_2 , but it is not exist.
   Refer to `AbstractRangeShardingAlgorithm`
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-915702709


   > Hi @qiuxiaotong2021
   > I will investigate this issue.
   
   Thank u.
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-915697004


   Hi @qiuxiaotong2021 
   I will investigate this issue.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] RaigorJiang commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-917910613


   Hi @qiuxiaotong2021 
   I used the configuration you provided and tested the following algorithms: `VOLUME_RANGE` and `BOUNDARY_RANGE`
   They work normally.
   
   
   ![image](https://user-images.githubusercontent.com/5668787/133040120-5bf52a9a-332e-40f9-a879-62d7b03bc39c.png)
   ![image](https://user-images.githubusercontent.com/5668787/133040236-a5d7e48c-d010-4dbe-a91c-ec8c17c6c4eb.png)
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu closed issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293


   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-929868712


   > @qiuxiaotong2021 I saw your properties
   > 
   > ```
   > spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
   > spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=order-volume-range-table
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.type=VOLUME_RANGE
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-lower=5
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.range-upper=10
   > spring.shardingsphere.rules.sharding.sharding-algorithms.order-volume-range-table.props.sharding-volume=5
   > ```
   > 
   > this will make the range to `-∞,5), [5,10),[10,+∞) ` and you sharding key is `order_id` , So it'll sharding to t_order_2 , but it is not exist. Refer to `AbstractRangeShardingAlgorithm`
   
   According to @tuichenchuxin  investigation, it can be seen that there is no problem with the `VOLUME_RANGE` algorithm, so I will close this issue.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] qiuxiaotong2021 commented on issue #12293: VOLUME_RANGE sharding strategy exception in sharding-5-beata.

Posted by GitBox <gi...@apache.org>.
qiuxiaotong2021 commented on issue #12293:
URL: https://github.com/apache/shardingsphere/issues/12293#issuecomment-915704507


   - Append:
   
   BOUNDARY_RANGE has the same problem.
   
   - config:
    
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-column=order_id
   spring.shardingsphere.rules.sharding.tables.t_order.table-strategy.standard.sharding-algorithm-name=order-boundary-range-table
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-boundary-range-table.type=BOUNDARY_RANGE
   spring.shardingsphere.rules.sharding.sharding-algorithms.order-boundary-range-table.props.sharding-ranges=1000,2000,5000


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org