geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [01/18] incubator-geode git commit: GEODE-1819: modified BRQ so that all initialization is done before destroyed tokens are cleaned up
Date Tue, 06 Sep 2016 17:23:25 GMT
Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-420 a97ea4ee5 -> 6853f56dd


GEODE-1819: modified BRQ so that all initialization is done before destroyed tokens are cleaned
up


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/bb44eb6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/bb44eb6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/bb44eb6d

Branch: refs/heads/feature/GEODE-420
Commit: bb44eb6d51144a3c9798d4323eabf3d4beab8cda
Parents: 331cf28
Author: Barry Oglesby <boglesby@pivotal.io>
Authored: Fri Aug 26 15:28:45 2016 -0700
Committer: Barry Oglesby <boglesby@pivotal.io>
Committed: Wed Aug 31 13:54:00 2016 -0700

----------------------------------------------------------------------
 .../internal/cache/BucketRegionQueue.java       | 28 +++++++-------------
 .../internal/cache/DistributedRegion.java       |  2 +-
 2 files changed, 11 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bb44eb6d/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
index a3d9d97..92442d9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegionQueue.java
@@ -95,26 +95,18 @@ public class BucketRegionQueue extends AbstractBucketRegionQueue {
     indexes = new ConcurrentHashMap<Object, Long>();
   }
 
-  /*
-   * (non-Javadoc)
-   * 
-   * @see
-   * com.gemstone.gemfire.internal.cache.BucketRegion#initialize(java.io.InputStream
-   * ,
-   * com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember
-   * , com.gemstone.gemfire.internal.cache.InternalRegionArguments)
-   */
-  @Override
-  protected void initialize(InputStream snapshotInputStream,
-      InternalDistributedMember imageTarget,
-      InternalRegionArguments internalRegionArgs) throws TimeoutException,
-      IOException, ClassNotFoundException {
+  protected void cleanUpDestroyedTokensAndMarkGIIComplete(InitialImageOperation.GIIStatus
giiStatus) {
+    // Load events from temp queued events
+    loadEventsFromTempQueue();
 
-    super.initialize(snapshotInputStream, imageTarget, internalRegionArgs);
+    // Initialize the eventSeqNumQueue
+    initializeEventSeqNumQueue();
 
-    //take initialization writeLock inside the method after synchronizing on tempQueue
-    loadEventsFromTempQueue();
-    
+    // Clean up destroyed tokens
+    super.cleanUpDestroyedTokensAndMarkGIIComplete(giiStatus);
+  }
+
+  private void initializeEventSeqNumQueue() {
     getInitializationLock().writeLock().lock();
     try {
       if (!this.keySet().isEmpty()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bb44eb6d/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index a7b82ac..aa74af7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -1635,7 +1635,7 @@ public class DistributedRegion extends LocalRegion implements
   // release afterGetInitialImageInitializationLatch before unlocking
   // cleanUpLock
   @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UL_UNRELEASED_LOCK")
-  private void cleanUpDestroyedTokensAndMarkGIIComplete(GIIStatus giiStatus)
+  protected void cleanUpDestroyedTokensAndMarkGIIComplete(GIIStatus giiStatus)
   {
     //We need to clean up the disk before we release the after get initial image latch
     DiskRegion dskRgn = getDiskRegion();


Mime
View raw message