jmbkeyes opened a new issue #12512: URL: https://github.com/apache/shardingsphere/issues/12512
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Below is the demo code. The last save will not be successfully, for an exception(UnsupportedOperationException) is raised by the sharding algorithm. 1. sharding algorithm. ` public class CenterIdPrecisionShardingAlgorithm implements StandardShardingAlgorithm<Long>{ @Override public String doSharding(Collection<String> availableTargetNames, PreciseShardingValue<Long> shardingValue) { String value = Consts.CENTERID_MAPPING.get(shardingValue.getValue()); if(null == value){ throw new UnsupportedOperationException(); } return value; } @Override public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Long> shardingValue) { return null; } @Override public void init() { System.out.println('a'); } @Override public String getType() { return "centerid"; } @Override public Properties getProps() { return null; } @Override public void setProps(Properties props) { } } ` 2. demo code. ` @RequestMapping(value = "tci") @Transactional(rollbackFor = Exception.class) @ShardingTransactionType(value = TransactionType.BASE) public Object testTraineeCenterInfo() throws Exception { TraineeCenterInfo tci = new TraineeCenterInfo(); tci.setCenterId(1L); tci.setName("abc1"); tci.setId(1L); traineeCenterInfoRepository.save(tci); tci = new TraineeCenterInfo(); tci.setCenterId(2L); tci.setName("abc2"); tci.setId(2L); traineeCenterInfoRepository.save(tci); tci = new TraineeCenterInfo(); tci.setCenterId(3L); tci.setName("abc3"); tci.setId(3L); traineeCenterInfoRepository.save(tci); try { tci = new TraineeCenterInfo(); tci.setCenterId(4L); tci.setName("abc4"); tci.setId(4L); traineeCenterInfoRepository.save(tci); }catch(Exception ex){ throw new Exception("111"); } return "ok"; } ` 3. shard rules. ` rules: sharding: sharding-algorithms: centerid-standard: type: CLASS_BASED props: strategy: standard algorithmClassName: com.forzadata.bodytrack.shardingstrategy.database.CenterIdPrecisionShardingAlgorithm tables: trainee_center_info: actual-data-nodes: bocaicheckin$->{2018..2020}.trainee_center_info database-strategy: standard: sharding-column: centerId sharding-algorithm-name: centerid-standard table-strategy: none: props: sql-show: true ` 4. logs. 2021-09-17 10:22:44.869 INFO 13428 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : Begin new global transaction [192.168.150.1:8091:182075428110864384] 2021-09-17 10:22:45.645 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=? 2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty) 2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1] 2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1] 2021-09-17 10:22:45.646 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [1] 2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=? 2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty) 2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2] 2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2] 2021-09-17 10:22:45.760 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [2] 2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=? 2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty) 2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3] 2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3] 2021-09-17 10:22:45.763 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [3] 2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Logic SQL: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ from trainee_center_info traineecen0_ where traineecen0_.id=? 2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : SQLStatement: MySQLSelectStatement(limit=Optional.empty, lock=Optional.empty, window=Optional.empty) 2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2018 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4] 2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2019 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4] 2021-09-17 10:22:45.765 INFO 13428 --- [nio-9090-exec-1] ShardingSphere-SQL : Actual SQL: bocaicheckin2020 ::: select traineecen0_.id as id1_0_0_, traineecen0_.centerId as centerid2_0_0_, traineecen0_.name as name3_0_0_ , id AS ORDER_BY_DERIVED_0 from trainee_center_info traineecen0_ where traineecen0_.id=? ORDER BY id ASC ::: [4] 2021-09-17 10:22:53.866 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : channel [id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091] read idle. 2021-09-17 10:22:53.867 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091] 2021-09-17 10:22:53.867 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 - R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.netty.NettyClientChannelManager : return to pool, rm channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : channel valid false,channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.868 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : channel inactive: [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : channel valid false,channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.core.rpc.netty.NettyPoolableFactory : will destroy channel:[id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091] 2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.869 INFO 13428 --- [ctor_RMROLE_1_1] i.s.c.r.n.AbstractNettyRemotingClient : ChannelHandlerContext(AbstractNettyRemotingClient$ClientHandler#0, [id: 0xa938e6bf, L:/127.0.0.1:21618 ! R:/127.0.0.1:8091]) will closed 2021-09-17 10:22:53.871 INFO 13428 --- [nio-9090-exec-1] i.seata.tm.api.DefaultGlobalTransaction : [192.168.150.1:8091:182075428110864384] commit status: Committed 2021-09-17 10:22:53.921 ERROR 13428 --- [nio-9090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Error while committing the transaction; nested exception is javax.persistence.RollbackException: Error while committing the transaction] with root cause java.lang.RuntimeException: null at com.forzadata.bodytrack.shardingstrategy.database.CenterIdPrecisionShardingAlgorithm.doSharding(CenterIdPrecisionShardingAlgorithm.java:16) ~[main/:na] at org.apache.shardingsphere.sharding.algorithm.sharding.classbased.ClassBasedShardingAlgorithm.doSharding(ClassBasedShardingAlgorithm.java:87) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:68) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.strategy.type.standard.StandardShardingStrategy.doSharding(StandardShardingStrategy.java:57) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeDataSources(ShardingStandardRoutingEngine.java:203) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route0(ShardingStandardRoutingEngine.java:191) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditionsWithCondition(ShardingStandardRoutingEngine.java:114) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.routeByShardingConditions(ShardingStandardRoutingEngine.java:107) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.getDataNodes(ShardingStandardRoutingEngine.java:84) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.type.standard.ShardingStandardRoutingEngine.route(ShardingStandardRoutingEngine.java:69) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:61) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.sharding.route.engine.ShardingSQLRouter.createRouteContext(ShardingSQLRouter.java:47) ~[shardingsphere-sharding-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.infra.route.engine.impl.PartialSQLRouteExecutor.route(PartialSQLRouteExecutor.java:62) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.infra.route.engine.SQLRouteEngine.route(SQLRouteEngine.java:52) ~[shardingsphere-infra-route-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.route(KernelProcessor.java:54) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.infra.context.kernel.KernelProcessor.generateExecutionContext(KernelProcessor.java:46) ~[shardingsphere-infra-context-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionContext(ShardingSpherePreparedStatement.java:363) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta] at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:229) ~[shardingsphere-jdbc-core-5.0.0-beta.jar:5.0.0-beta] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3302) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3829) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684) ~[na:1.8.0_171] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:348) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1362) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:453) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3212) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2380) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:447) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:183) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$300(JdbcResourceLocalTransactionCoordinatorImpl.java:40) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:281) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:101) ~[hibernate-core-5.4.27.Final.jar:5.4.27.Final] at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerSynchronization.afterCommit(ExtendedEntityManagerCreator.java:477) ~[spring-orm-5.3.3.jar:5.3.3] at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCommit(TransactionSynchronizationUtils.java:134) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerAfterCommit(TransactionSynchronizationUtils.java:122) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCommit(AbstractPlatformTransactionManager.java:945) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:782) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:711) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-5.3.3.jar:5.3.3] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3] at org.apache.shardingsphere.spring.transaction.ShardingTransactionTypeInterceptor.invoke(ShardingTransactionTypeInterceptor.java:44) ~[shardingsphere-jdbc-transaction-spring-5.0.0-beta.jar:5.0.0-beta] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.3.3.jar:5.3.3] at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750) ~[spring-aop-5.3.3.jar:5.3.3] at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692) ~[spring-aop-5.3.3.jar:5.3.3] at com.forzadata.bodytrack.controller.TestController$$EnhancerBySpringCGLIB$$5756a5ca.testTraineeCenterInfo(<generated>) ~[main/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_171] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_171] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_171] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_171] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197) ~[spring-web-5.3.3.jar:5.3.3] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141) ~[spring-web-5.3.3.jar:5.3.3] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1060) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) ~[spring-webmvc-5.3.3.jar:5.3.3] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) ~[spring-webmvc-5.3.3.jar:5.3.3] at javax.servlet.http.HttpServlet.service(HttpServlet.java:626) ~[tomcat-embed-core-9.0.41.jar:4.0.FR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) ~[spring-webmvc-5.3.3.jar:5.3.3] at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) ~[tomcat-embed-core-9.0.41.jar:4.0.FR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-5.3.3.jar:5.3.3] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-5.3.3.jar:5.3.3] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-5.3.3.jar:5.3.3] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.3.3.jar:5.3.3] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:374) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1597) [tomcat-embed-core-9.0.41.jar:9.0.41] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.41.jar:9.0.41] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.41.jar:9.0.41] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171] 2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.c.r.netty.NettyClientChannelManager : will connect to 127.0.0.1:8091 2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : RM will register :jdbc:mysql://10.0.0.5:3306/bocai_checkin2018,jdbc:mysql://10.0.0.5:3306/bocai_checkin2020,jdbc:mysql://10.0.0.5:3306/bocai_checkin2019 2021-09-17 10:23:25.122 INFO 13428 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : NettyPool create channel to transactionRole:RMROLE,address:127.0.0.1:8091,msg:< RegisterRMRequest{resourceIds='jdbc:mysql://10.0.0.5:3306/bocai_checkin2018,jdbc:mysql://10.0.0.5:3306/bocai_checkin2020,jdbc:mysql://10.0.0.5:3306/bocai_checkin2019', applicationId='bodytrack_checkin', transactionServiceGroup='my_test_tx_group'} > 2021-09-17 10:23:25.132 INFO 13428 --- [eoutChecker_2_1] i.s.c.rpc.netty.RmNettyRemotingClient : register RM success. client version:1.4.1, server version:1.4.1,channel:[id: 0x585cd576, L:/127.0.0.1:28558 - R:/127.0.0.1:8091] 2021-09-17 10:23:25.132 INFO 13428 --- [eoutChecker_2_1] i.s.core.rpc.netty.NettyPoolableFactory : register success, cost 4 ms, version:1.4.1,role:RMROLE,channel:[id: 0x585cd576, L:/127.0.0.1:28558 - R:/127.0.0.1:8091] Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? 5.0beta ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-JDBC ### Expected behavior All should be rollback. ### Actual behavior First 3 records are successfully saved. ### Reason analyze (If you can) ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ### Example codes for reproduce this issue (such as a github link). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
