mirror of https://github.com/apache/lucene.git
added some debug information
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/realtime_search@1097138 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8fb4f5a766
commit
f89d7b4ee0
|
@ -73,6 +73,8 @@ final class DocumentsWriterDeleteQueue {
|
|||
/* only acquired to update the global deletes */
|
||||
private final ReentrantLock globalBufferLock = new ReentrantLock();
|
||||
|
||||
long generation;
|
||||
|
||||
DocumentsWriterDeleteQueue() {
|
||||
this(new BufferedDeletes(false));
|
||||
}
|
||||
|
@ -379,4 +381,11 @@ final class DocumentsWriterDeleteQueue {
|
|||
public long bytesUsed() {
|
||||
return globalBufferedDeletes.bytesUsed.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DWDQ: [ generation: " + generation + " ]";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -303,7 +303,9 @@ public final class DocumentsWriterFlushControl {
|
|||
flushingQueue = documentsWriter.deleteQueue;
|
||||
// Set a new delete queue - all subsequent DWPT will use this queue until
|
||||
// we do another full flush
|
||||
documentsWriter.deleteQueue = new DocumentsWriterDeleteQueue(new BufferedDeletes(false));
|
||||
DocumentsWriterDeleteQueue newQueue = new DocumentsWriterDeleteQueue();
|
||||
newQueue.generation = flushingQueue.generation + 1;
|
||||
documentsWriter.deleteQueue = newQueue;
|
||||
}
|
||||
final Iterator<ThreadState> allActiveThreads = perThreadPool
|
||||
.getActivePerThreadsIterator();
|
||||
|
@ -315,7 +317,14 @@ public final class DocumentsWriterFlushControl {
|
|||
if (!next.isActive()) {
|
||||
continue;
|
||||
}
|
||||
assert next.perThread.deleteQueue == flushingQueue || next.perThread.deleteQueue == documentsWriter.deleteQueue;
|
||||
assert next.perThread.deleteQueue == flushingQueue
|
||||
|| next.perThread.deleteQueue == documentsWriter.deleteQueue : " flushingQueue: "
|
||||
+ flushingQueue
|
||||
+ " currentqueue: "
|
||||
+ documentsWriter.deleteQueue
|
||||
+ " perThread queue: "
|
||||
+ next.perThread.deleteQueue
|
||||
+ " numDocsInRam: " + next.perThread.getNumDocsInRAM();
|
||||
if (next.perThread.deleteQueue != flushingQueue) {
|
||||
// this one is already a new DWPT
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue