Kirk Lund created GEODE-5345:
--------------------------------

             Summary: Region initialization latches should not be invoked twice 
when creating a region
                 Key: GEODE-5345
                 URL: https://issues.apache.org/jira/browse/GEODE-5345
             Project: Geode
          Issue Type: Bug
          Components: regions
            Reporter: Kirk Lund


Log statements reveal that the methods which release initialization latches 
(before-initial-image and after-initial-image) are being invoked twice when 
creating BucketRegions:
{noformat}
11365-1: [fine 2018/06/21 15:09:27.699 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Releasing Initialization Latch (before initial 
image) for /__PR/_B__partitionedRegion_60

11365-1: [info 2018/06/21 15:09:27.699 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Region /__PR/_B__partit        ionedRegion_60 
was created on this member with the persistent id 
rs-GEM-1722-klunda0i3large-hydra-client-10/10.32.108.22:/var/vcap/data/rundir/concParRegPersistVOOH4.bt015
        /concParRegPersist-0621-150824/vm_0_client1_disk_1 created at timestamp 
1529618948528 version 0 diskStoreId efc74f8db5024abb-81bedb7d3f6e038f name null.

11365-1: [fine 2018/06/21 15:09:27.699 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Releasing Initialization Latch (after initial 
image) for /__PR/_B__partitionedRegion_60
 
1365-1: [info 2018/06/21 15:09:27.699 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Initialization of region 
_B__partitionedRegion_60 completed

11365-1: [fine 2018/06/21 15:09:27.700 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Releasing Initialization Latch (before initial 
image) for /__PR/_B__partitionedRegion_60

11365-1: [fine 2018/06/21 15:09:27.700 PDT 
gemfire1_rs-GEM-1722-klunda0i3large-hydra-client-10_11365 <Pooled Waiting 
Message Processor 5> tid=0xd0] Releasing Initialization Latch (after initial 
image) for /__PR/_B__partitionedRegion_60
{noformat}
These log statements are only logged in one method each:
{noformat}
  void releaseBeforeGetInitialImageLatch() {
    if (logger.isDebugEnabled()) {
      logger.debug("Releasing Initialization Latch (before initial image) for 
{}", getFullPath());
    }
    releaseLatch(this.getInitializationLatchBeforeGetInitialImage());
  }

  void releaseAfterGetInitialImageLatch() {
    if (logger.isDebugEnabled()) {
      logger.debug("Releasing Initialization Latch (after initial image) for 
{}", getFullPath());
    }
    releaseLatch(this.getInitializationLatchAfterGetInitialImage());
  }
{noformat}
Call hierarchy for these methods shows that there are multiple code paths. I'm 
not sure if they are double invoked for non-Bucket Region types or not:
{noformat}
LocalRegion.releaseBeforeGetInitialImageLatch()  
(org.apache.geode.internal.cache)
    DistributedRegion.getInitialImageAndRecovery(InputStream, 
InternalDistributedMember, InternalRegionArguments, boolean, 
PersistentMemberID)  (org.apache.geode.internal.cache)
    DistributedRegion.initialize(InputStream, InternalDistributedMember, 
InternalRegionArguments)  (org.apache.geode.internal.cache)
    LocalRegion.initialize(InputStream, InternalDistributedMember, 
InternalRegionArguments)  (org.apache.geode.internal.cache)
    LocalRegion.releaseLatches()  (org.apache.geode.internal.cache)
    PartitionedRegion.initPRInternals(InternalRegionArguments)  
(org.apache.geode.internal.cache)
{noformat}



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

Reply via email to