mirror of https://github.com/apache/lucene.git
LUCENE-7427: in DocumentsWriterDeleteQueue remove unused private members and tweak javadoc.
This commit is contained in:
parent
646b6bfd2c
commit
4abbdbe78a
|
@ -18,7 +18,6 @@ package org.apache.lucene.index;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import org.apache.lucene.index.DocValuesUpdate.BinaryDocValuesUpdate;
|
||||
|
@ -32,7 +31,8 @@ import org.apache.lucene.util.BytesRef;
|
|||
* queue. In contrast to other queue implementation we only maintain the
|
||||
* tail of the queue. A delete queue is always used in a context of a set of
|
||||
* DWPTs and a global delete pool. Each of the DWPT and the global pool need to
|
||||
* maintain their 'own' head of the queue (as a DeleteSlice instance per DWPT).
|
||||
* maintain their 'own' head of the queue (as a DeleteSlice instance per
|
||||
* {@link DocumentsWriterPerThread}).
|
||||
* The difference between the DWPT and the global pool is that the DWPT starts
|
||||
* maintaining a head once it has added its first document since for its segments
|
||||
* private deletes only the deletes after that document are relevant. The global
|
||||
|
@ -71,10 +71,6 @@ final class DocumentsWriterDeleteQueue implements Accountable {
|
|||
|
||||
// the current end (latest delete operation) in the delete queue:
|
||||
private volatile Node<?> tail;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static final AtomicReferenceFieldUpdater<DocumentsWriterDeleteQueue,Node> tailUpdater = AtomicReferenceFieldUpdater
|
||||
.newUpdater(DocumentsWriterDeleteQueue.class, Node.class, "tail");
|
||||
|
||||
/** Used to record deletes against all prior (already written to disk) segments. Whenever any segment flushes, we bundle up this set of
|
||||
* deletes and insert into the buffered updates stream before the newly flushed segment(s). */
|
||||
|
@ -322,17 +318,9 @@ final class DocumentsWriterDeleteQueue implements Accountable {
|
|||
this.item = item;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
static final AtomicReferenceFieldUpdater<Node,Node> nextUpdater = AtomicReferenceFieldUpdater
|
||||
.newUpdater(Node.class, Node.class, "next");
|
||||
|
||||
void apply(BufferedUpdates bufferedDeletes, int docIDUpto) {
|
||||
throw new IllegalStateException("sentinel item must never be applied");
|
||||
}
|
||||
|
||||
boolean casNext(Node<?> cmp, Node<?> val) {
|
||||
return nextUpdater.compareAndSet(this, cmp, val);
|
||||
}
|
||||
}
|
||||
|
||||
private static final class TermNode extends Node<Term> {
|
||||
|
|
Loading…
Reference in New Issue