diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 4f64a73dab6..9d89c2365f1 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -326,6 +326,8 @@ Optimizations performance for queries that need skipping such as conjunctions. (Adrien Grand) +* GITHUB#13581: OnHeapHnswGraph no longer allocates a lock for every graph node (Mike Sokolov) + Changes in runtime behavior --------------------- diff --git a/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswLock.java b/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswLock.java index 6dbfd83b566..d7947c7fab1 100644 --- a/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswLock.java +++ b/lucene/core/src/java/org/apache/lucene/util/hnsw/HnswLock.java @@ -26,7 +26,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock; * Provide (read-and-write) locked access to rows of an OnHeapHnswGraph. For use by * HnswConcurrentMerger and its HnswGraphBuilders. */ -public class HnswLock { +class HnswLock { private static final int NUM_LOCKS = 512; private final ReentrantReadWriteLock[] locks; private final OnHeapHnswGraph graph;