[ https://issues.apache.org/jira/browse/GEODE-6518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16791933#comment-16791933 ]
xiaojian zhou commented on GEODE-6518: -------------------------------------- {noformat} In my test, it failed with following exception: distcache.DistCacheException: remote server on rs-gesterjdbc-client-1(edgegemfire1_host1_7376:7376:loner):55429:9830d075:edgegemfire1_host1_7376: : While performing a remote put at distcache.gemfire.GemFireCacheTestImpl.create(GemFireCacheTestImpl.java:259) at cacheperf.CachePerfClient.create(CachePerfClient.java:1088) at cacheperf.CachePerfClient.createData(CachePerfClient.java:1075) at cacheperf.CachePerfClient.createDataTask(CachePerfClient.java:1064) 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 hydra.MethExecutor.execute(MethExecutor.java:173) at hydra.MethExecutor.execute(MethExecutor.java:141) at hydra.TestTask.execute(TestTask.java:197) at hydra.RemoteTestModule$1.run(RemoteTestModule.java:213) Caused by: org.apache.geode.cache.client.ServerOperationException: remote server on rs-gesterjdbc-client-1(edgegemfire1_host1_7376:7376:loner):55429:9830d075:edgegemfire1_host1_7376: : While performing a remote put at org.apache.geode.cache.client.internal.PutOp$PutOpImpl.processAck(PutOp.java:389) at org.apache.geode.cache.client.internal.PutOp$PutOpImpl.processResponse(PutOp.java:313) at org.apache.geode.cache.client.internal.PutOp$PutOpImpl.attemptReadResponse(PutOp.java:454) at org.apache.geode.cache.client.internal.AbstractOp.attempt(AbstractOp.java:387) at org.apache.geode.cache.client.internal.ConnectionImpl.execute(ConnectionImpl.java:289) at org.apache.geode.cache.client.internal.pooling.PooledConnection.execute(PooledConnection.java:338) at org.apache.geode.cache.client.internal.OpExecutorImpl.executeWithPossibleReAuthentication(OpExecutorImpl.java:912) at org.apache.geode.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:174) at org.apache.geode.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:130) at org.apache.geode.cache.client.internal.PoolImpl.execute(PoolImpl.java:792) at org.apache.geode.cache.client.internal.PutOp.execute(PutOp.java:90) at org.apache.geode.cache.client.internal.ServerRegionProxy.put(ServerRegionProxy.java:155) at org.apache.geode.internal.cache.LocalRegion.serverPut(LocalRegion.java:3038) at org.apache.geode.internal.cache.LocalRegion.cacheWriteBeforePut(LocalRegion.java:3187) at org.apache.geode.internal.cache.ProxyRegionMap.basicPut(ProxyRegionMap.java:238) at org.apache.geode.internal.cache.LocalRegion.virtualPut(LocalRegion.java:5708) at org.apache.geode.internal.cache.LocalRegionDataView.putEntry(LocalRegionDataView.java:162) at org.apache.geode.internal.cache.LocalRegion.basicPut(LocalRegion.java:5134) at org.apache.geode.internal.cache.LocalRegion.validatedCreate(LocalRegion.java:1103) at org.apache.geode.internal.cache.LocalRegion.create(LocalRegion.java:1085) at org.apache.geode.internal.cache.AbstractRegion.create(AbstractRegion.java:405) at distcache.gemfire.GemFireCacheTestImpl.create(GemFireCacheTestImpl.java:252) ... 11 more Caused by: org.apache.geode.internal.cache.wan.GatewaySenderConfigurationException: Region DefaultRegion has [JDBC#DefaultRegion] AsyncEvent queue IDs. Another cache has same region with [] AsyncEvent queue IDs. For region across all members, AsyncEvent queue IDs should be same. at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.PartitionedRegion.checkSameSenderIdsAvailableOnAllNodes(PartitionedRegion.java:1291) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.LocalRegion.notifyGatewaySender(LocalRegion.java:6228) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.BucketRegion.notifyGatewaySender(BucketRegion.java:723) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.LocalRegion.basicPutPart2(LocalRegion.java:5874) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.BucketRegion.basicPutPart2(BucketRegion.java:707) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.RegionMapPut.doBeforeCompletionActions(RegionMapPut.java:268) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPutAndDeliverEvent(AbstractRegionMapPut.java:301) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.runWithIndexUpdatingInProgress(AbstractRegionMapPut.java:308) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPutIfPreconditionsSatisified(AbstractRegionMapPut.java:296) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPutOnSynchronizedRegionEntry(AbstractRegionMapPut.java:282) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPutOnRegionEntryInMap(AbstractRegionMapPut.java:273) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.addRegionEntryToMapAndDoPut(AbstractRegionMapPut.java:251) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPutRetryingIfNeeded(AbstractRegionMapPut.java:216) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doWithIndexInUpdateMode(AbstractRegionMapPut.java:198) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.doPut(AbstractRegionMapPut.java:180) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.runWhileLockedForCacheModification(AbstractRegionMapPut.java:119) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.RegionMapPut.runWhileLockedForCacheModification(RegionMapPut.java:150) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.map.AbstractRegionMapPut.put(AbstractRegionMapPut.java:169) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.AbstractRegionMap.basicPut(AbstractRegionMap.java:2044) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.BucketRegion.virtualPut(BucketRegion.java:532) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.PartitionedRegionDataStore.putLocally(PartitionedRegionDataStore.java:1204) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.PartitionedRegionDataStore.putLocally(PartitionedRegionDataStore.java:1187) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.PartitionedRegionDataView.putEntryOnRemote(PartitionedRegionDataView.java:99) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.partitioned.PutMessage.operateOnPartitionedRegion(PutMessage.java:707) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.cache.partitioned.PartitionMessage.process(PartitionMessage.java:330) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:369) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.DistributionMessage.schedule(DistributionMessage.java:426) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.ClusterDistributionManager.scheduleIncomingMessage(ClusterDistributionManager.java:2891) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.ClusterDistributionManager.handleIncomingDMsg(ClusterDistributionManager.java:2571) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.ClusterDistributionManager.access$1300(ClusterDistributionManager.java:110) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.ClusterDistributionManager$DMListener.messageReceived(ClusterDistributionManager.java:3429) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.dispatchMessage(GMSMembershipManager.java:1108) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager.handleOrDeferMessage(GMSMembershipManager.java:1027) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.membership.gms.mgr.GMSMembershipManager$MyDCReceiver.messageReceived(GMSMembershipManager.java:407) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.distributed.internal.direct.DirectChannel.receive(DirectChannel.java:701) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.TCPConduit.messageReceived(TCPConduit.java:702) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.Connection.dispatchMessage(Connection.java:3427) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.Connection.readMessage(Connection.java:3164) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.Connection.processInputBuffer(Connection.java:2959) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.Connection.readMessages(Connection.java:1743) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in org.apache.geode.internal.tcp.Connection.run(Connection.java:1579) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at Remote Member 'rs-gesterjdbc-client-1(bridgegemfire1_host1_7371:7371)<ec><v1>:41001' in java.lang.Thread.run(Thread.java:748) at org.apache.geode.distributed.internal.ReplyException.handleCause(ReplyException.java:86) at org.apache.geode.internal.cache.partitioned.PartitionMessage$PartitionResponse.waitForCacheException(PartitionMessage.java:846) at org.apache.geode.internal.cache.partitioned.PutMessage$PutResponse.waitForResult(PutMessage.java:1031) at org.apache.geode.internal.cache.PartitionedRegion.putRemotely(PartitionedRegion.java:3261) at org.apache.geode.internal.cache.PartitionedRegion.putInBucket(PartitionedRegion.java:2895) at org.apache.geode.internal.cache.PartitionedRegion.virtualPut(PartitionedRegion.java:2090) at org.apache.geode.internal.cache.LocalRegionDataView.putEntry(LocalRegionDataView.java:162) at org.apache.geode.internal.cache.LocalRegion.basicUpdate(LocalRegion.java:5688) at org.apache.geode.internal.cache.LocalRegion.basicBridgePut(LocalRegion.java:5325) at org.apache.geode.internal.cache.tier.sockets.command.Put65.cmdExecute(Put65.java:393) at org.apache.geode.internal.cache.tier.sockets.BaseCommand.execute(BaseCommand.java:183) at org.apache.geode.internal.cache.tier.sockets.ServerConnection.doNormalMessage(ServerConnection.java:851) at org.apache.geode.internal.cache.tier.sockets.OriginalServerConnection.doOneMessage(OriginalServerConnection.java:75) at org.apache.geode.internal.cache.tier.sockets.ServerConnection.run(ServerConnection.java:1227) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.lambda$initializeServerConnectionThreadPool$3(AcceptorImpl.java:616) at org.apache.geode.internal.logging.LoggingThreadFactory.lambda$newThread$0(LoggingThreadFactory.java:121) at java.lang.Thread.run(Thread.java:748) {noformat} > if the region's data policy is empty, create jdbc-mapping will failed with NPE > ------------------------------------------------------------------------------ > > Key: GEODE-6518 > URL: https://issues.apache.org/jira/browse/GEODE-6518 > Project: Geode > Issue Type: Bug > Components: jdbc > Reporter: xiaojian zhou > Priority: Major > > {noformat} > We never had a test case to create a region on one member with data, and on > another member as accessor (i.e. data policy is empty). Then create a > jdbc-mapping. This is a valid use case. > Apply the following diff, it will modify the test case to test above scenario. > diff --git > a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java > > b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java > index 06043f1657..ccb79b56c6 100644 > --- > a/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java > +++ > b/geode-connectors/src/distributedTest/java/org/apache/geode/connectors/jdbc/internal/cli/CreateMappingCommandDUnitTest.java > @@ -119,7 +119,7 @@ public class CreateMappingCommandDUnitTest { > server1 = startupRule.startServerVM(1, locator.getPort()); > server2 = startupRule.startServerVM(2, TEST_GROUP1, locator.getPort()); > server3 = startupRule.startServerVM(3, TEST_GROUP2, locator.getPort()); > - server4 = startupRule.startServerVM(4, TEST_GROUP1 + "," + TEST_GROUP2, > locator.getPort()); > + server4 = startupRule.startServerVM(4, "Gester", locator.getPort()); > gfsh.connectAndVerify(locator); > setupDatabase(); > @@ -196,10 +196,10 @@ public class CreateMappingCommandDUnitTest { > .statusIsSuccess(); > } > - private void setupGroupPartition(String regionName, String groupNames) { > + private void setupGroupPartition(String regionName, String groupNames, > boolean isAccessor) { > gfsh.executeAndAssertThat( > - "create region --name=" + regionName + " --type=PARTITION --groups=" > + groupNames) > - .statusIsSuccess(); > + "create region --name=" + regionName + (isAccessor ? " > --type=PARTITION_PROXY" > + : " --type=PARTITION") + " --groups=" + > groupNames).statusIsSuccess(); > } > private void setupAsyncEventQueue(String regionName) { > @@ -346,7 +346,7 @@ public class CreateMappingCommandDUnitTest { > @Test > public void > createMappingPartitionedUpdatesServiceAndClusterConfigForServerGroup() { > String regionName = GROUP2_REGION; > - setupGroupPartition(regionName, TEST_GROUP2); > + setupGroupPartition(regionName, TEST_GROUP2, false); > CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING); > csb.addOption(REGION_NAME, regionName); > csb.addOption(DATA_SOURCE_NAME, "connection"); > @@ -424,7 +424,8 @@ public class CreateMappingCommandDUnitTest { > @Test > public void > createMappingPartitionedUpdatesServiceAndClusterConfigForMultiServerGroup() { > String regionName = "/" + GROUP1_GROUP2_REGION; > - setupGroupPartition(regionName, TEST_GROUP1 + "," + TEST_GROUP2); > + setupGroupPartition(regionName, TEST_GROUP1, false); > + setupGroupPartition(regionName, TEST_GROUP2, true); > CommandStringBuilder csb = new CommandStringBuilder(CREATE_MAPPING); > csb.addOption(REGION_NAME, regionName); > csb.addOption(DATA_SOURCE_NAME, "connection"); > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)