Eric Shu created GEODE-7243: ------------------------------- Summary: A client transaction should fail with TransactionDataNotColocatedException instead of TransactionDataRebalancedException Key: GEODE-7243 URL: https://issues.apache.org/jira/browse/GEODE-7243 Project: Geode Issue Type: Bug Components: transactions Reporter: Eric Shu
When a transaction touches entries on different nodes, it should throw TransactionDataNotColocatedException, but currently TransactionDataRebalancedException is thrown. org.apache.geode.cache.TransactionDataRebalancedException: Transactional data moved, due to rebalancing. at org.apache.geode.internal.cache.TXStateProxyImpl.getTransactionException(TXStateProxyImpl.java:251) at org.apache.geode.internal.cache.TXStateProxyImpl.findObject(TXStateProxyImpl.java:536) at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1379) at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1318) at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1303) at org.apache.geode.internal.cache.AbstractRegion.get(AbstractRegion.java:435) at org.apache.geode.internal.cache.ClientServerTransactionFailoverDistributedTest.foo(ClientServerTransactionFailoverDistributedTest.java:473) 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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.apache.geode.test.dunit.rules.AbstractDistributedRule$1.evaluate(AbstractDistributedRule.java:59) at org.apache.geode.test.dunit.rules.AbstractDistributedRule$1.evaluate(AbstractDistributedRule.java:59) at org.apache.geode.test.dunit.rules.AbstractDistributedRule$1.evaluate(AbstractDistributedRule.java:59) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70) The exception thrown from server is: [vm0] [debug 2019/09/25 10:06:19.698 PDT <ServerConnection on port 60895 Thread 1> tid=0x4f] Server connection from [identity(10.118.20.64(4651:loner):60909:23506369,connection=1; port=60909]: Wrote exception: Transactional data moved, due to rebalancing. [vm0] org.apache.geode.cache.TransactionDataRebalancedException: Transactional data moved, due to rebalancing., caused by org.apache.geode.internal.cache.PrimaryBucketException: Bucket 0 is not primary. Current primary holder is 10.118.20.64(4654)<v2>:41002 [vm0] at org.apache.geode.internal.cache.PartitionedRegion.getDataRegionForWrite(PartitionedRegion.java:9509) [vm0] at org.apache.geode.internal.cache.PartitionedRegion.getDataRegionForWrite(PartitionedRegion.java:258) [vm0] at org.apache.geode.internal.cache.TXState.txReadEntry(TXState.java:1536) [vm0] at org.apache.geode.internal.cache.TXState.txReadEntry(TXState.java:1525) [vm0] at org.apache.geode.internal.cache.TXState.getDeserializedValue(TXState.java:1602) [vm0] at org.apache.geode.internal.cache.TXStateProxyImpl.getDeserializedValue(TXStateProxyImpl.java:315) [vm0] at org.apache.geode.internal.cache.LocalRegion.get(LocalRegion.java:1367) [vm0] at org.apache.geode.internal.cache.LocalRegion.getRetained(LocalRegion.java:1345) [vm0] at org.apache.geode.internal.cache.LocalRegion.getRetained(LocalRegion.java:1330) [vm0] at org.apache.geode.internal.cache.tier.sockets.command.Get70.getEntryRetained(Get70.java:341) [vm0] at org.apache.geode.internal.cache.tier.sockets.command.Get70.getEntry(Get70.java:235) [vm0] at org.apache.geode.internal.cache.tier.sockets.command.Get70.cmdExecute(Get70.java:153) [vm0] at org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:177) [vm0] at org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMessage(ServerConnection.java:848) [vm0] at org.apache.geode.internal.cache.tier.sockets.OriginalServerConnection.doOneMessage(OriginalServerConnection.java:72) [vm0] at org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1212) [vm0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [vm0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [vm0] at org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.lambda$initializeServerConnectionThreadPool$3(AcceptorImpl.java:674) [vm0] at org.apache.geode.internal.logging.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:121) [vm0] at java.lang.Thread.run(Thread.java:748) [vm0] Caused by: org.apache.geode.internal.cache.PrimaryBucketException: Bucket 0 is not primary. Current primary holder is 10.118.20.64(4654)<v2>:41002 [vm0] at org.apache.geode.internal.cache.PartitionedRegion.getDataRegionForWrite(PartitionedRegion.java:9498) [vm0] ... 20 more -- This message was sent by Atlassian Jira (v8.3.4#803005)