Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-8625

If the GatewaySenderEventImpl is retrieved from disk while marking events as possible duplicate, then the possibleDuplicate setting isn't retained

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • wan
    • None

    Description

      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:

      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)
      

      Here is an example for event at shadowKey=1857.

      After the above call that event shows possibleDuplicate=true:

      GatewaySenderEventImpl[region=/data;key=1537;value=Trade[id=1537; cusip=VMW; shares=54; price=993];possibleDuplicate=true;shadowKey=1857;...]
      

      Dumping the events in the queue after recovery has completed (after the above call) shows the value as NOT_AVAILABLE:

      RegionEntry (a VMThinDiskLRURegionEntryHeapLongKey) contains: [key class=java.lang.Long; value=1857]; [value class=org.apache.geode.internal.cache.Token$NotAvailable; value=NOT_AVAILABLE]
      

      And when a member in the remote site is started, the batch containing that event shows possibleDuplicate=false:

      GatewaySenderEventImpl[region=/data;key=1537;value=Trade[id=1537; cusip=VMW; shares=54; price=993];possibleDuplicate=false;shadowKey=1857;...]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            boglesby Barrett Oglesby
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: