ethbak commented on code in PR #16627:
URL: https://github.com/apache/lucene/pull/16627#discussion_r3971378204


##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswGraphBuilder.java:
##########
@@ -665,6 +678,94 @@ private void link(int level, int n0, int n1, float score, 
FixedBitSet notFullyCo
     }
   }
 
+  /**
+   * Fixes disconnected nodes at a specific level by searching from each 
node's existing neighbors
+   * to find additional connections. A node with no neighbors is instead 
connected from scratch via
+   * {@link #addConnections}.
+   *
+   * <p>When {@link #hnswLock} is set (concurrent repair) each node's existing 
neighbors are

Review Comment:
   `InitializedHnswGraphBuilder.repairDisconnectedNodes` is also a caller, its 
easy to miss because its unqualified and inherited. So I kept the method in 
HnswGraphBuilder as it is shared. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to