geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kh...@apache.org
Subject [09/35] geode git commit: GEODE-2679: Lucene asynchronous disk writes for aeq can lead to data mismatch after compacting
Date Tue, 28 Mar 2017 16:46:37 GMT
GEODE-2679: Lucene asynchronous disk writes for aeq can lead to data mismatch after compacting

* forcing disk sync = true for Lucene AEQ


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

Branch: refs/heads/feature/GEODE-2420
Commit: 33e65ba0fbd64f6e8f313833d7ed6c7e77d6f65c
Parents: c0ccf83
Author: Jason Huynh <huynhja@gmail.com>
Authored: Fri Mar 17 16:36:16 2017 -0700
Committer: Ken Howe <khowe@pivotal.io>
Committed: Mon Mar 27 14:00:41 2017 -0700

----------------------------------------------------------------------
 .../org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java  | 2 +-
 .../lucene/LuceneIndexCreationPersistenceIntegrationTest.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/33e65ba0/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
index 66dc1f9..93fb25b 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneIndexImpl.java
@@ -170,7 +170,7 @@ public abstract class LuceneIndexImpl implements InternalLuceneIndex {
       factory.setPersistent(true);
     }
     factory.setDiskStoreName(dataRegion.getAttributes().getDiskStoreName());
-    factory.setDiskSynchronous(dataRegion.getAttributes().isDiskSynchronous());
+    factory.setDiskSynchronous(true);
     factory.setForwardExpirationDestroy(true);
     return factory;
   }

http://git-wip-us.apache.org/repos/asf/geode/blob/33e65ba0/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationPersistenceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationPersistenceIntegrationTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationPersistenceIntegrationTest.java
index 8f65574..bed6f13 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationPersistenceIntegrationTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationPersistenceIntegrationTest.java
@@ -112,7 +112,7 @@ public class LuceneIndexCreationPersistenceIntegrationTest extends LuceneIntegra
 
   @Test
   @Parameters({"true", "false"})
-  public void shouldUseDiskSynchronousWhenUserRegionHasDiskSynchronous(boolean synchronous)
{
+  public void aeqShouldAlwaysBeDiskSynchronousWhenUserRegionIsEither(boolean synchronous)
{
     createIndex(cache, "text");
     cache.createRegionFactory(RegionShortcut.PARTITION_PERSISTENT).setDiskSynchronous(synchronous)
         .create(REGION_NAME);
@@ -122,7 +122,7 @@ public class LuceneIndexCreationPersistenceIntegrationTest extends LuceneIntegra
       assertTrue(region.isDiskSynchronous());
     });
     AsyncEventQueue queue = getIndexQueue(cache);
-    assertEquals(synchronous, queue.isDiskSynchronous());
+    assertTrue(queue.isDiskSynchronous());
     assertEquals(true, queue.isPersistent());
   }
 


Mime
View raw message