Barrett Oglesby created GEODE-8625:
--------------------------------------
Summary: If the GatewaySenderEventImpl is retrieved from disk
while marking events as possible duplicate, then the possibleDuplicate setting
isn't retained
Key: GEODE-8625
URL: https://issues.apache.org/jira/browse/GEODE-8625
Project: Geode
Issue Type: Bug
Components: wan
Reporter: Barrett Oglesby
By default, when starting a member with a persisted region, the values are not
read from disk. This includes WAN queues. One of the things that occurs after
the primary lock is acquired for a bucket is to mark all events in the queue as
possible duplicates. The markEventsAsDuplicate method uses LocalRegion.getNoLRU
to retrieve the GatewaySenderEventImpl. This method doesn't retain the value in
the region, so setting possibleDuplicate to true is lost.
Here is a stack dump of the call:
{noformat}
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1333)
at
org.apache.geode.internal.cache.LocalRegion.getNoLRU(LocalRegion.java:3558)
at
org.apache.geode.internal.cache.AbstractBucketRegionQueue.markEventsAsDuplicate(AbstractBucketRegionQueue.java:277)
at
org.apache.geode.internal.cache.BucketRegionQueue.beforeAcquiringPrimaryState(BucketRegionQueue.java:206)
at
org.apache.geode.internal.cache.BucketAdvisor.acquiredPrimaryLock(BucketAdvisor.java:1165)
at
org.apache.geode.internal.cache.BucketAdvisor.acquirePrimaryRecursivelyForColocated(BucketAdvisor.java:1305)
at
org.apache.geode.internal.cache.BucketAdvisor.access$700(BucketAdvisor.java:84)
at
org.apache.geode.internal.cache.BucketAdvisor$VolunteeringDelegate.doVolunteerForPrimary(BucketAdvisor.java:2530)
at
org.apache.geode.internal.cache.BucketAdvisor$VolunteeringDelegate.lambda$consumeQueue$0(BucketAdvisor.java:2728)
{noformat}
Here is an example for event at shadowKey=1857.
After the above call that event shows possibleDuplicate=true:
{noformat}
GatewaySenderEventImpl[region=/data;key=1537;value=Trade[id=1537; cusip=VMW;
shares=54; price=993];possibleDuplicate=true;shadowKey=1857;...]
{noformat}
Dumping the events in the queue after recovery has completed (after the above
call) shows the value as NOT_AVAILABLE:
{noformat}
RegionEntry (a VMThinDiskLRURegionEntryHeapLongKey) contains: [key
class=java.lang.Long; value=1857]; [value
class=org.apache.geode.internal.cache.Token$NotAvailable; value=NOT_AVAILABLE]
{noformat}
And when a member in the remote site is started, the batch containing that
event shows possibleDuplicate=false:
{noformat}
GatewaySenderEventImpl[region=/data;key=1537;value=Trade[id=1537; cusip=VMW;
shares=54; price=993];possibleDuplicate=false;shadowKey=1857;...]
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)