Apache Lucene open-source search software
stop the jenkins screaming: BytesRefArray.bytesUsed is NOT RIGHT
Robert Muir31407be62da4
diff --git a/lucene/core/src/java/org/apache/lucene/index/BinaryDocValuesWriter.java b/lucene/core/src/java/org/apache/lucene/index/BinaryDocValuesWriter.javaindex c7521894ddc..9664553e276 100644--- a/lucene/core/src/java/org/apache/lucene/index/BinaryDocValuesWriter.java+++ b/lucene/core/src/java/org/apache/lucene/index/BinaryDocValuesWriter.java@@ -44,9 +44,9 @@ class BinaryDocValuesWriter extends DocValuesWriter {public BinaryDocValuesWriter(FieldInfo fieldInfo, Counter iwBytesUsed) {this.fieldInfo = fieldInfo;this.bytesRefArray = new BytesRefArray(iwBytesUsed);- bytesUsed = bytesRefArray.bytesUsed();+ bytesUsed = bytesRefArray.bytesUsed(); // nocommit: totally wrong!!!!this.iwBytesUsed = iwBytesUsed;- iwBytesUsed.addAndGet(bytesUsed);+ //nocommit WRONG iwBytesUsed.addAndGet(bytesUsed);}public void addValue(int docID, BytesRef value) {@@ -72,7 +72,7 @@ class BinaryDocValuesWriter extends DocValuesWriter {private void updateBytesUsed() {final long newBytesUsed = bytesRefArray.bytesUsed();- iwBytesUsed.addAndGet(newBytesUsed - bytesUsed);+ // nocommit: WRONG iwBytesUsed.addAndGet(newBytesUsed - bytesUsed);bytesUsed = newBytesUsed;}