Apache Lucene open-source search software
Remove unused nonZeroLevelSize (#15022)
Viliam Durina497045daea1a
diff --git a/lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.java b/lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.javaindex da0dd1641b3..eb9014f7357 100644--- a/lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.java+++ b/lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.java@@ -53,10 +53,6 @@ public final class OnHeapHnswGraph extends HnswGraph implements Accountable {// levelToNodesprivate final AtomicInteger size =new AtomicInteger(0); // graph size, which is number of nodes in level 0- private final AtomicInteger nonZeroLevelSize =- new AtomicInteger(- 0); // total number of NeighborArrays created that is not on level 0, for now it- // is only used to account memory usageprivate final AtomicInteger maxNodeId = new AtomicInteger(-1);private final int nsize; // neighbour array size at non-zero levelprivate final int nsize0; // neighbour array size at zero level@@ -182,7 +178,6 @@ public final class OnHeapHnswGraph extends HnswGraph implements Accountable {long bytesUsed = graphRamBytesUsed;graphRamBytesUsed = bytesUsed + l;});- nonZeroLevelSize.incrementAndGet();}maxNodeId.accumulateAndGet(node, Math::max);}