[ 
https://issues.apache.org/jira/browse/GEODE-3172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16077444#comment-16077444
 ] 

ASF GitHub Bot commented on GEODE-3172:
---------------------------------------

GitHub user upthewaterspout opened a pull request:

    https://github.com/apache/geode/pull/620

    GEODE-3172: Fix serialization errors with client queues from between 1.0 
and 1.2

    Adding new tests and fixing errors when copying a client queue from a 1.0 
member to a 1.2 member, or from a 1.2 member to a 1.0 member.
    
    We were not respecting the version of the 1.0 member when deserializing or 
serializing the HAEventWrapper class, which is stored as a value in a geode 
region.
    
    This will affect *all* GII's between different versions, because I had to 
change the GII code to serialize values using the version of the GII recipient.
    
    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:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
    
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    - [ ] Does `gradlew build` run cleanly?
    
    - [ ] 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, you check travis-ci 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].


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/upthewaterspout/incubator-geode 
feature/GEODE-3172

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geode/pull/620.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #620
    
----
commit 607d5d283dca5cd030d03d6201d6b5b4677d9b04
Author: Dan Smith <[email protected]>
Date:   2017-07-06T22:08:04Z

    GEODE-3172: Test of GII'ing client queue from 9.0 to 9.1
    
    Adding a test that demonstrates the serialization issues we are seeing
    with this issue. The test starts a 9.0 server, puts some data in the
    queue and starts a 9.1 server.
    
    The test fails because the 9.1 server never gets the queue contents. In
    the log the serialization error is present.

commit f983511edc2d83560f436f350e1b445469d98dfc
Author: Dan Smith <[email protected]>
Date:   2017-07-06T22:07:44Z

    GEODE-3172: Deserialize HAEventWrapper using peer version
    
    Rather than deserialize the event wrapper using the current version, use
    the version of the peer that sent the wrapper too this member.
    
    This is a partial fix for this issue, because it only fixes the case of
    1.2 copying the queue from 1.0. If a 1.0 member copies the queue from
    1.2, there is still an issue.

commit e35333f940f66ad904be410ab80076506bc83ca4
Author: Dan Smith <[email protected]>
Date:   2017-07-07T01:07:53Z

    GEODE-3172: Writing region entries using the GII recipients version
    
    We were serializing entries to the remote member using Version.CURRENT,
    rather than the version of the remote member, when sending entries as
    part of GII.

----


> Clients miss events when servers are upgraded from 1.0 to 1.2 due to 
> serialization issues with HAEventWrapper
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-3172
>                 URL: https://issues.apache.org/jira/browse/GEODE-3172
>             Project: Geode
>          Issue Type: Bug
>          Components: client queues, membership
>            Reporter: Dan Smith
>            Assignee: Dan Smith
>             Fix For: 1.2.0
>
>
> We're seeing another data loss issue when upgrading servers due to 
> GEODE-2137. The issue is that we store HAEventWrapper objects in a region for 
> server->client queues. These objects contain a member ID. Because the objects 
> are region values, they can be lazily deserialized using the version of the 
> current member, which may not match the version of the member they were 
> serialized with.
> What we are seeing is that when a client is creating a queue on a 9.1 server, 
> and it is copying the contents of the queue from a 9.0 server, we get are 
> getting serialization errors which prevent the queue from being created. When 
> the 9.0 server is killed as part of a rolling upgrade, this results in event 
> loss.
> {noformat}
> [severe 2017/07/06 15:09:52.195 PDT <Handshaker 0.0.0.0/0.0.0.0:23779 Thread 
> 6> tid=0xc0] Uncaught exception in thread Thread[Handshaker 
> 0.0.0.0/0.0.0.0:23779 Thread 6,5,Handshaker 0.0.0.0/0.0.0.0:23779]
> org.apache.geode.InternalGemFireError: unexpected typeCode: -126
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.InternalDataSerializer.decodePrimitiveClass(InternalDataSerializer.java:1880)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.DataSerializer.readClass(DataSerializer.java:264)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2707)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.DataSerializer.readObject(DataSerializer.java:2961)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.tier.sockets.HAEventWrapper.fromData(HAEventWrapper.java:330)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.InternalDataSerializer.invokeFromData(InternalDataSerializer.java:2370)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.DSFIDFactory.create(DSFIDFactory.java:981)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.InternalDataSerializer.basicReadObject(InternalDataSerializer.java:2691)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.DataSerializer.readObject(DataSerializer.java:2961)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.util.BlobHelper.deserializeBlob(BlobHelper.java:99)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1911)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.EntryEventImpl.deserialize(EntryEventImpl.java:1904)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.VMCachedDeserializable.getDeserializedValue(VMCachedDeserializable.java:134)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.AbstractRegionMap.initialImagePut(AbstractRegionMap.java:771)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.InitialImageOperation.processChunk(InitialImageOperation.java:928)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.InitialImageOperation$ImageProcessor.process(InitialImageOperation.java:1249)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.ReplyMessage.process(ReplyMessage.java:213)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.internal.cache.InitialImageOperation$ImageReplyMessage.process(InitialImageOperation.java:2723)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.ReplyMessage.dmProcess(ReplyMessage.java:193)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.ReplyMessage.process(ReplyMessage.java:186)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:374)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:440)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:665)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> org.apache.geode.distributed.internal.DistributionManager$5$1.run(DistributionManager.java:961)
>       at Remote Member '172.1.1.1(32406)<v4>:32771' in 
> java.lang.Thread.run(Thread.java:748)
>       at 
> org.apache.geode.distributed.internal.ReplyException.handleAsUnexpected(ReplyException.java:89)
>       at 
> org.apache.geode.internal.cache.InitialImageOperation.getFromOne(InitialImageOperation.java:501)
>       at 
> org.apache.geode.internal.cache.DistributedRegion.getInitialImageAndRecovery(DistributedRegion.java:1182)
>       at 
> org.apache.geode.internal.cache.DistributedRegion.initialize(DistributedRegion.java:1022)
>       at 
> org.apache.geode.internal.cache.HARegion.initialize(HARegion.java:337)
>       at 
> org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3077)
>       at 
> org.apache.geode.internal.cache.HARegion.getInstance(HARegion.java:257)
>       at 
> org.apache.geode.internal.cache.ha.HARegionQueue.createHARegion(HARegionQueue.java:367)
>       at 
> org.apache.geode.internal.cache.ha.HARegionQueue.<init>(HARegionQueue.java:347)
>       at 
> org.apache.geode.internal.cache.ha.HARegionQueue$BlockingHARegionQueue.<init>(HARegionQueue.java:2100)
>       at 
> org.apache.geode.internal.cache.ha.HARegionQueue$DurableHARegionQueue.<init>(HARegionQueue.java:2331)
>       at 
> org.apache.geode.internal.cache.ha.HARegionQueue.getHARegionQueueInstance(HARegionQueue.java:1953)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientProxy$MessageDispatcher.<init>(CacheClientProxy.java:2321)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientProxy.initializeMessageDispatcher(CacheClientProxy.java:1730)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.initializeProxy(CacheClientNotifier.java:610)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.registerClient(CacheClientNotifier.java:537)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.registerGFEClient(CacheClientNotifier.java:330)
>       at 
> org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier.registerClient(CacheClientNotifier.java:277)
>       at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.handleNewClientConnection(AcceptorImpl.java:1457)
>       at 
> org.apache.geode.internal.cache.tier.sockets.AcceptorImpl$5.run(AcceptorImpl.java:1332)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>       at java.lang.Thread.run(Thread.java:748)
> {noformat}
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to