Apache Lucene open-source search software
LUCENE-3100: IW.commit() writes but fails to fsync the N.fnx file
Simon Willnauer801d63d36919
diff --git a/lucene/src/java/org/apache/lucene/index/SegmentInfos.java b/lucene/src/java/org/apache/lucene/index/SegmentInfos.javaindex 3dfdda579d7..089d6021bef 100644--- a/lucene/src/java/org/apache/lucene/index/SegmentInfos.java+++ b/lucene/src/java/org/apache/lucene/index/SegmentInfos.java@@ -831,6 +831,10 @@ public final class SegmentInfos extends Vector<SegmentInfo> {} catch (Throwable t) {// throw orig excp}+ } else {+ // we must sync here explicitly since during a commit+ // IW will not sync the global field map.+ dir.sync(Collections.singleton(name));}}return version;