diff --git a/CHANGES.txt b/CHANGES.txt index 5df7248dd24..dc6395eb911 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -168,8 +168,15 @@ New features obtained or released, throwing an exception if an illegal lock obtain occurred. (Patrick Kimber via Mike McCandless) - 6. LUCENE-1015: Added FieldCache extension (ExtendedFieldCache) to support doubles and longs. - Added support into SortField for sorting on doubles and longs as well. (Grant Ingersoll) + 6. LUCENE-1015: Added FieldCache extension (ExtendedFieldCache) to support doubles and longs. + Added support into SortField for sorting on doubles and longs as well. (Grant Ingersoll) + + 7. LUCENE-1044: Added optional doSync boolean to + FSDirectory.getDirectory(...). If true (the default) then we will + always sync() a file before closing it, which improves the + likelihood that the index will remain consistent when the OS or + machine crashes, or power to the machine is cut. (Venkat Rangan + via Mike McCandless) Optimizations diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java index 56205306aa5..7eed12a0976 100644 --- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java +++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java @@ -126,7 +126,8 @@ public class PerfRunData { FileUtils.fullyDelete(indexDir); } indexDir.mkdirs(); - directory = FSDirectory.getDirectory(indexDir); + final boolean doSync = config.get("fsdirectory.dosync", true); + directory = FSDirectory.getDirectory(indexDir, null, doSync); } else { directory = new RAMDirectory(); } diff --git a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/package.html b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/package.html index 520c0f3ad01..53bb9710338 100644 --- a/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/package.html +++ b/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/package.html @@ -478,6 +478,12 @@ Some of the currently defined properties are: This tells which directory to use for the performance test. +
elapsedSec
would bring more insight.