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

ASF subversion and git services commented on GEODE-6854:
--------------------------------------------------------

Commit 1154210713e084cc50be6eb710f9168563a09564 in geode's branch 
refs/heads/feature/GEODE-6854 from Barry Oglesby
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=1154210 ]

GEODE-6854: Modified and added unit test for GatewaySenderEventImpl.equals


> GatewaySender batch conflation can incorrectly conflate events causing out of 
> order processing
> ----------------------------------------------------------------------------------------------
>
>                 Key: GEODE-6854
>                 URL: https://issues.apache.org/jira/browse/GEODE-6854
>             Project: Geode
>          Issue Type: Bug
>          Components: wan
>            Reporter: Barry Oglesby
>            Assignee: Barry Oglesby
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> If a batch contains 2 equal update events, 
> {{AbstractGatewaySenderEventProcessor conflate}} will remove the original 
> event and add the later event at the end of the list. Depending on the other 
> events in the list, this could cause the batch to contain events that are out 
> of order.
> For example, in this batch containing 6 events before conflation, the last 
> two events are duplicates of earlier events:
> {noformat}
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=2;bucketId=89];action=1;operation=UPDATE;region=/dataStoreRegion;key=Object_6079;shadowKey=16587]
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=3;bucketId=89];action=2;operation=DESTROY;region=/dataStoreRegion;key=Object_6079;shadowKey=16700]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=9;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_7731;shadowKey=16813]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=12;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_6591;shadowKey=16926]
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=3;bucketId=89];action=2;operation=DESTROY;region=/dataStoreRegion;key=Object_6079;shadowKey=16700]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=9;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_7731;shadowKey=16813]
> {noformat}
> Conflating this batch results in these 4 events:
> {noformat}
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=2;bucketId=89];action=1;operation=UPDATE;region=/dataStoreRegion;key=Object_6079;shadowKey=16587]
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=3;bucketId=89];action=2;operation=DESTROY;region=/dataStoreRegion;key=Object_6079;shadowKey=16700]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=12;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_6591;shadowKey=16926]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=9;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_7731;shadowKey=16813]
> {noformat}
> Notice the shadowKeys and sequenceIds are out of order after the conflation.
> Conflation should produce this batch:
> {noformat}
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=2;bucketId=89];action=1;operation=UPDATE;region=/dataStoreRegion;key=Object_6079;shadowKey=16587]
> SenderEventImpl[id=EventID[threadID=0x10059|104;sequenceID=3;bucketId=89];action=2;operation=DESTROY;region=/dataStoreRegion;key=Object_6079;shadowKey=16700]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=9;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_7731;shadowKey=16813]
> SenderEventImpl[id=EventID[threadID=0x10059|112;sequenceID=12;bucketId=89];action=1;operation=PUTALL_UPDATE;region=/dataStoreRegion;key=Object_6591;shadowKey=16926]
> {noformat}
> This is similar to GEODE-4704, but not exactly the same.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to