mirror of https://github.com/apache/lucene.git
LUCENE-9147: Avoid reusing file names with FileSwitchDirectory or NRTCachingDirectory and IOContext randomization.
This commit is contained in:
parent
63be99bf12
commit
1b882246d7
|
@ -79,12 +79,12 @@ public final class FieldsIndexWriter implements Closeable {
|
|||
this.id = id;
|
||||
this.blockShift = blockShift;
|
||||
this.ioContext = ioContext;
|
||||
this.docsOut = dir.createTempOutput(name, "doc_ids", ioContext);
|
||||
this.docsOut = dir.createTempOutput(name, codecName + "-doc_ids", ioContext);
|
||||
IndexOutput filePointersOut = null;
|
||||
boolean success = false;
|
||||
try {
|
||||
CodecUtil.writeHeader(docsOut, codecName + "Docs", VERSION_CURRENT);
|
||||
this.filePointersOut = filePointersOut = dir.createTempOutput(name, "file_pointers", ioContext);
|
||||
this.filePointersOut = filePointersOut = dir.createTempOutput(name, codecName + "file_pointers", ioContext);
|
||||
CodecUtil.writeHeader(filePointersOut, codecName + "FilePointers", VERSION_CURRENT);
|
||||
success = true;
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue