[
https://issues.apache.org/jira/browse/GEODE-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16334986#comment-16334986
]
xiaojian zhou commented on GEODE-3967:
--------------------------------------
{noformat}
There are following race conditions contribute together to the bug:
1) When ConcurrentModificationException happened:
* if tag's timestamp is higher, then notifyGateSender with
UPDATE_VERSION_STAMP, which is creating a new event id.
* if tag's timestamp is lower, then do nothing.
In either way, the event for original event id not sent to the Gateway queue.
If this member happened to host the primary queue, the event in second queue
will not get a chance to cleanup. We should notify gatewaySender for event with
CME
2) UPDATE_VERSION_STAMP will have new event id. If this member happened to be a
secondary queue, then the event will stay there long or forever. We should
check if queue's primary, only enqueue UPDATE_VERSION_STAMP event when queue is
primary.
3) AUO.doPutOrCreate() will call basicUpdate() 3 times, or 3 tries: create,
update, create.
There's race that between update(2nd try) and create (3rd try), other thread
delete the entry caused the 2nd try failed, then before 3rd try, a create jump
in cause the 3rd try failed silently (no log and no exception, not to
notifyGatewaySender).
As the last try, it should use ifNew=false, ifOld=false to apply the put()
anyway.
{noformat}
> if put hits concurrent modification exception should still notify serial
> gateway sender
> ---------------------------------------------------------------------------------------
>
> Key: GEODE-3967
> URL: https://issues.apache.org/jira/browse/GEODE-3967
> Project: Geode
> Issue Type: Bug
> Components: wan
> Reporter: xiaojian zhou
> Assignee: xiaojian zhou
> Priority: Major
> Labels: pull-request-available
>
> In serial gateway sender, the event arrives at secondary will be put into
> unprocessedMap and wait for event from primary queue to distribute over, then
> remove it from the unprocessedMap.
> If the put at primary member (member with primary queue) failed with CME, the
> event in unprocessedMap will never be removed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)