You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2015/11/03 20:38:38 UTC

[06/35] incubator-geode git commit: GEODE-244 Flush entries to disk in testRecoverRedundancyParallelAsyncEventQueue

GEODE-244 Flush entries to disk in testRecoverRedundancyParallelAsyncEventQueue

The queue is configured for async persistence, which means entries were
being flushed to disk asynchronously. Due to GEODE-498, the size of the
buckets could vary widely if the entries were not flushed to disk,
causing the rebalance to have problems later.


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

Branch: refs/heads/develop
Commit: b0427d964d7573af2b1f9fd647ea371be3002dc4
Parents: 5cf6389
Author: Dan Smith <up...@apache.org>
Authored: Mon Oct 26 15:58:49 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Mon Oct 26 16:04:55 2015 -0700

----------------------------------------------------------------------
 .../internal/cache/control/RebalanceOperationDUnitTest.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b0427d96/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index beaa1e8..9029b8d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -49,6 +49,7 @@ import com.gemstone.gemfire.cache.PartitionAttributesFactory;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
 import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
+import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
 import com.gemstone.gemfire.cache.control.RebalanceOperation;
 import com.gemstone.gemfire.cache.control.RebalanceResults;
 import com.gemstone.gemfire.cache.control.ResourceManager;
@@ -1130,10 +1131,13 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         for(int i =0; i< 12; i++) {
           region.put(Integer.valueOf(i), "A", new byte[1024 * 512]);
         }
+        
+        // GEODE-244 - the async event queue uses asnychronous writes. Flush 
+        // the default disk store to make sure all values have overflowed
+        cache.findDiskStore(null).flush();
       }
     });
     
-    
     //check to make sure our redundancy is impaired
     SerializableRunnable checkLowRedundancy = new SerializableRunnable("checkLowRedundancy") {
 
@@ -1150,6 +1154,8 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
         assertEquals(12, details.getCreatedBucketCount());
         assertEquals(0,  details.getActualRedundantCopies());
         assertEquals(12,details.getLowRedundancyBucketCount());
+        AsyncEventQueue queue = cache.getAsyncEventQueue("parallelQueue");
+        assertEquals(12, queue.size());
       }
     };