Skip to content

Commit 7ec9882

Browse files
committed
Disable HNSW connectedComponents (#14214) (#14436)
* Disable HNSW connectedComponents (#14214) * add changes
1 parent 9c4a99d commit 7ec9882

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lucene/CHANGES.txt

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ Bug Fixes
203203

204204
* GITHUB#14320: Fix DirectIOIndexInput seek to not read when position is within buffer (Chris Hegarty)
205205

206+
* GITHUB#14436: Disable connectedComponents logic in HNSW graph building. Relates to GITHUB#14214, GITHUB#12627, GITHUB#13566. (Ben Trent)
207+
206208
Changes in Runtime Behavior
207209
---------------------
208210
* GITHUB#14189: Bump floor segment size to 16MB in TieredMergePolicy and

lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,13 @@ private static int getRandomGraphLevel(double ml, SplittableRandom random) {
448448

449449
void finish() throws IOException {
450450
// System.out.println("finish " + frozen);
451-
connectComponents();
451+
// TODO: Connect components can be exceptionally expensive, disabling
452+
// see: https://github.com/apache/lucene/issues/14214
453+
// connectComponents();
452454
frozen = true;
453455
}
454456

457+
@SuppressWarnings("unused")
455458
private void connectComponents() throws IOException {
456459
long start = System.nanoTime();
457460
for (int level = 0; level < hnsw.numLevels(); level++) {

0 commit comments

Comments
 (0)