viswanathk commented on code in PR #14022: URL: https://github.com/apache/lucene/pull/14022#discussion_r1890613233
########## lucene/core/src/java/org/apache/lucene/util/hnsw/HnswUtil.java: ########## @@ -163,6 +164,10 @@ private static Component markRooted( throws IOException { // Start at entry point and search all nodes on this level // System.out.println("markRooted level=" + level + " entryPoint=" + entryPoint); + if (connectedNodes.get(entryPoint)) { + return new Component(entryPoint, 0); Review Comment: > oh wait, this can happen because we iterate over all the entryPoints. Q: do we need this zero-size component for anything? Can we recall what happens with these componentws when we're done - the only purpose is to use them for reconnecting the graph. Yeah it looks like we will try to connect them again, which we could skip. Let's not add these empty components to the list. I don't think we are adding the empty components to the list though. We are adding to the list with the total of the entryPoints for that level (which seems unlikely). In the other places we add, we start the `markRooted` process with the nextClearBit, so it won't return 0. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org