[
https://issues.apache.org/jira/browse/GEODE-8079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101891#comment-17101891
]
ASF GitHub Bot commented on GEODE-8079:
---------------------------------------
jujoramos opened a new pull request #5070:
URL: https://github.com/apache/geode/pull/5070
Attaching a parallel gateway-sender or async-event-queue to a
Replicate Region through the AttributesMutator class now throws an
exception instead of wrongly assigning the dispatcher to the region.
- Fixed several warnings.
- Added unit and distributed tests.
- Replaced usages of 'junit.Assert' by 'assertj'.
- Changed test methods to use more meaningful names.
- Removed references to old ids used by another ticketing system.
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [X] Is there a JIRA ticket associated with this PR? Is it referenced in
the commit message?
- [X] Has your PR been rebased against the latest commit within the target
branch (typically `develop`)?
- [ ] Is your initial contribution a single, squashed commit?
- [X] Does `gradlew build` run cleanly?
- [X] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
### Note:
Please ensure that once the PR is submitted, check Concourse for build
issues and
submit an update to your PR as soon as possible. If you need help, please
send an
email to [email protected].
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
> AttributesMutator Should Validate AsyncEventQueue/GatewaySender Type
> --------------------------------------------------------------------
>
> Key: GEODE-8079
> URL: https://issues.apache.org/jira/browse/GEODE-8079
> Project: Geode
> Issue Type: Bug
> Components: configuration, gfsh, wan
> Affects Versions: 1.12.0
> Reporter: Juan Ramos
> Assignee: Juan Ramos
> Priority: Major
> Labels: caching-applications
>
> By design, a parallel {{gateway-sender}} can't be attached to a {{REPLICATE}}
> region.
> While working on on GEODE-8029 I've found that the above fact is correctly
> validated when creating or initialising the region, but totally ignored when
> updating the region through the {{AttributesMutator}} class.
> Altering a {{REPLICATE}} region to dispatch events through a parallel
> {{gateway-sender}} results in cryptic errors while putting entries into the
> region afterwards:
> {noformat}
> [vm1] [warn 2020/05/06 10:34:09.638 IST <RMI TCP Connection(1)-127.0.0.1>
> tid=0x13] GatewaySender: Not queuing the event
> GatewaySenderEventImpl[id=EventID[id=18
> bytes;threadID=0x10062|2;sequenceID=91;bucketId=98];action=0;operation=CREATE;region=/TestRegion;key=Key90;value=Value90;valueIsObject=1;numberOfParts=9;callbackArgument=GatewaySenderEventCallbackArgument
>
> [originalCallbackArg=null;originatingSenderId=1;recipientGatewayReceivers={2}];possibleDuplicate=false;creationTime=1588757649638;shadowKey=-1;timeStamp=1588757649638;acked=false;dispatched=false;bucketId=98;isConcurrencyConflict=false],
> as the region for which this event originated is not yet configured in the
> GatewaySender
> [vm1] [warn 2020/05/06 10:34:09.638 IST <RMI TCP Connection(1)-127.0.0.1>
> tid=0x13] GatewaySender: Not queuing the event
> GatewaySenderEventImpl[id=EventID[id=18
> bytes;threadID=0x10063|2;sequenceID=92;bucketId=99];action=0;operation=CREATE;region=/TestRegion;key=Key91;value=Value91;valueIsObject=1;numberOfParts=9;callbackArgument=GatewaySenderEventCallbackArgument
>
> [originalCallbackArg=null;originatingSenderId=1;recipientGatewayReceivers={2}];possibleDuplicate=false;creationTime=1588757649638;shadowKey=-1;timeStamp=1588757649638;acked=false;dispatched=false;bucketId=99;isConcurrencyConflict=false],
> as the region for which this event originated is not yet configured in the
> GatewaySender
> [vm1] [warn 2020/05/06 10:34:09.639 IST <RMI TCP Connection(1)-127.0.0.1>
> tid=0x13] GatewaySender: Not queuing the event
> GatewaySenderEventImpl[id=EventID[id=18
> bytes;threadID=0x10064|2;sequenceID=93;bucketId=100];action=0;operation=CREATE;region=/TestRegion;key=Key92;value=Value92;valueIsObject=1;numberOfParts=9;callbackArgument=GatewaySenderEventCallbackArgument
>
> [originalCallbackArg=null;originatingSenderId=1;recipientGatewayReceivers={2}];possibleDuplicate=false;creationTime=1588757649638;shadowKey=-1;timeStamp=1588757649638;acked=false;dispatched=false;bucketId=100;isConcurrencyConflict=false],
> as the region for which this event originated is not yet configured in the
> GatewaySender
> [vm1] [warn 2020/05/06 10:34:09.639 IST <RMI TCP Connection(1)-127.0.0.1>
> tid=0x13] GatewaySender: Not queuing the event
> GatewaySenderEventImpl[id=EventID[id=18
> bytes;threadID=0x10065|2;sequenceID=94;bucketId=101];action=0;operation=CREATE;region=/TestRegion;key=Key93;value=Value93;valueIsObject=1;numberOfParts=9;callbackArgument=GatewaySenderEventCallbackArgument
>
> [originalCallbackArg=null;originatingSenderId=1;recipientGatewayReceivers={2}];possibleDuplicate=false;creationTime=1588757649639;shadowKey=-1;timeStamp=1588757649639;acked=false;dispatched=false;bucketId=101;isConcurrencyConflict=false],
> as the region for which this event originated is not yet configured in the
> GatewaySender
> {noformat}
> When done from {{GFSH}}, on the other hand, the server doesn't even start up
> after altering the region as the {{cluster-configuration}} is invalid:
> {noformat}
> gfsh -e "connect" -e "create region --name=TestRegion --type=REPLICATE"
> Member | Status | Message
> --------------- | ------ | -------------------------------------------------
> cluster1-server | OK | Region "/TestRegion" created on "cluster1-server"
> Cluster configuration for group 'cluster' is updated.
> gfsh -e "connect" -e "create gateway-sender --id=MyGateway
> --remote-distributed-system-id=2 --parallel=true"
> Member | Status | Message
> --------------- | ------ |
> ------------------------------------------------------
> cluster1-server | OK | GatewaySender "MyGateway" created on
> "cluster1-server"
> Cluster configuration for group 'cluster' is updated.
> gfsh -e "connect" -e "alter region --name=/TestRegion
> -–gateway-sender-id=MyGateway"
> Member | Status | Message
> --------------- | ------ | -------------------------
> cluster1-server | OK | Region TestRegion altered
> Cluster configuration for group 'cluster' is updated.
> ////// Restart Cluster
> [warn 2020/05/06 10:09:07.385 IST <main> tid=0x1] Initialization failed for
> Region /TestRegion
> org.apache.geode.internal.cache.wan.GatewaySenderConfigurationException:
> Parallel gateway sender MyGateway can not be used with replicated region
> /TestRegion
> at
> org.apache.geode.internal.cache.DistributedRegion.preInitialize(DistributedRegion.java:1035)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:2996)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:2891)
> at
> org.apache.geode.internal.cache.xmlcache.RegionCreation.createRoot(RegionCreation.java:237)
> at
> org.apache.geode.internal.cache.xmlcache.CacheCreation.initializeRegions(CacheCreation.java:658)
> at
> org.apache.geode.internal.cache.xmlcache.CacheCreation.create(CacheCreation.java:592)
> at
> org.apache.geode.internal.cache.xmlcache.CacheXmlParser.create(CacheXmlParser.java:339)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.loadCacheXml(GemFireCacheImpl.java:4096)
> at
> org.apache.geode.internal.cache.ClusterConfigurationLoader.applyClusterXmlConfiguration(ClusterConfigurationLoader.java:208)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.applyJarAndXmlFromClusterConfig(GemFireCacheImpl.java:1409)
> at
> org.apache.geode.internal.cache.GemFireCacheImpl.initialize(GemFireCacheImpl.java:1374)
> at
> org.apache.geode.internal.cache.InternalCacheBuilder.create(InternalCacheBuilder.java:191)
> at
> org.apache.geode.internal.cache.InternalCacheBuilder.create(InternalCacheBuilder.java:158)
> at org.apache.geode.cache.CacheFactory.create(CacheFactory.java:142)
> at
> org.apache.geode.distributed.internal.DefaultServerLauncherCacheProvider.createCache(DefaultServerLauncherCacheProvider.java:52)
> at
> org.apache.geode.distributed.ServerLauncher.createCache(ServerLauncher.java:892)
> at
> org.apache.geode.distributed.ServerLauncher.start(ServerLauncher.java:807)
> at
> org.apache.geode.distributed.ServerLauncher.run(ServerLauncher.java:737)
> at
> org.apache.geode.distributed.ServerLauncher.main(ServerLauncher.java:256)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)