mirror of
https://github.com/apache/lucene.git
synced 2025-02-10 20:15:18 +00:00
do not clear threadbindings when DWPT is swapped out for flushing
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/realtime_search@1087687 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cf37cec0c6
commit
44e74e4bbc
@ -119,6 +119,8 @@ final class DocumentsWriter {
|
||||
final BufferedDeletesStream bufferedDeletesStream;
|
||||
// TODO: cutover to BytesRefHash
|
||||
private final BufferedDeletes pendingDeletes = new BufferedDeletes(false);
|
||||
private Collection<String> abortedFiles; // List of files that were written before last abort()
|
||||
|
||||
final IndexingChain chain;
|
||||
|
||||
final DocumentsWriterPerThreadPool perThreadPool;
|
||||
@ -214,7 +216,7 @@ final class DocumentsWriter {
|
||||
pendingDeletes.addTerm(term, BufferedDeletes.MAX_INT);
|
||||
}
|
||||
|
||||
Iterator<ThreadState> threadsIterator = perThreadPool.getActivePerThreadsIterator();
|
||||
final Iterator<ThreadState> threadsIterator = perThreadPool.getActivePerThreadsIterator();
|
||||
|
||||
while (threadsIterator.hasNext()) {
|
||||
ThreadState state = threadsIterator.next();
|
||||
@ -239,19 +241,16 @@ final class DocumentsWriter {
|
||||
indexWriter.flushCount.incrementAndGet();
|
||||
}
|
||||
|
||||
/** If non-null, various details of indexing are printed
|
||||
* here. */
|
||||
synchronized void setInfoStream(PrintStream infoStream) {
|
||||
this.infoStream = infoStream;
|
||||
pushConfigChange();
|
||||
}
|
||||
|
||||
private final void pushConfigChange() {
|
||||
Iterator<ThreadState> it = perThreadPool.getAllPerThreadsIterator();
|
||||
final Iterator<ThreadState> it = perThreadPool.getAllPerThreadsIterator();
|
||||
while (it.hasNext()) {
|
||||
DocumentsWriterPerThread perThread = it.next().perThread;
|
||||
perThread.docState.infoStream = this.infoStream;
|
||||
perThread.docState.similarityProvider = this.similarityProvider;
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,7 +258,6 @@ final class DocumentsWriter {
|
||||
int getNumDocs() {
|
||||
return numDocsInRAM.get();
|
||||
}
|
||||
private Collection<String> abortedFiles; // List of files that were written before last abort()
|
||||
|
||||
Collection<String> abortedFiles() {
|
||||
return abortedFiles;
|
||||
|
@ -132,7 +132,6 @@ public abstract class DocumentsWriterPerThreadPool {
|
||||
} else {
|
||||
threadState.resetWriter(null);
|
||||
}
|
||||
clearThreadBindings(threadState); // TODO - do we need to clear ThreadBindings here since we swap DWPT this is not necessary
|
||||
return dwpt;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user