Skip to content

Commit

Permalink
GEODE-2679: Lucene asynchronous disk writes for aeq can lead to data …
Browse files Browse the repository at this point in the history
…mismatch after compacting

* forcing disk sync = true for Lucene AEQ
  • Loading branch information
jhuynh1 committed Mar 20, 2017
1 parent 84a1a9b commit 1787768
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private AsyncEventQueueFactoryImpl createAEQFactory(final Region dataRegion) {
factory.setPersistent(true);
}
factory.setDiskStoreName(dataRegion.getAttributes().getDiskStoreName());
factory.setDiskSynchronous(dataRegion.getAttributes().isDiskSynchronous());
factory.setDiskSynchronous(true);
factory.setForwardExpirationDestroy(true);
return factory;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void shouldNotUseDiskStoreWhenUserRegionIsNotPersistent() {

@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);
Expand All @@ -122,7 +122,7 @@ public void shouldUseDiskSynchronousWhenUserRegionHasDiskSynchronous(boolean syn
assertTrue(region.isDiskSynchronous());
});
AsyncEventQueue queue = getIndexQueue(cache);
assertEquals(synchronous, queue.isDiskSynchronous());
assertTrue(queue.isDiskSynchronous());
assertEquals(true, queue.isPersistent());
}

Expand Down

0 comments on commit 1787768

Please sign in to comment.