Skip to content

Apache Lucene open-source search software

LUCENE-710: make IndexWriter.abort() synchronized

Michael McCandlessb5a0c0c3deaf
diff --git a/src/java/org/apache/lucene/index/IndexWriter.java b/src/java/org/apache/lucene/index/IndexWriter.java
index 108aba3286d..469bfe0b28f 100644
--- a/src/java/org/apache/lucene/index/IndexWriter.java
+++ b/src/java/org/apache/lucene/index/IndexWriter.java
@@ -1269,7 +1269,7 @@ public class IndexWriter {
* the writer was opened with <code>autoCommit=true</code>.
* @throws IOException if there is a low-level IO error
*/
- public void abort() throws IOException {
+ public synchronized void abort() throws IOException {
ensureOpen();
if (!autoCommit) {