mayya-sharipova commented on code in PR #16794:
URL: https://github.com/apache/lucene/pull/16794#discussion_r4233804442
##########
lucene/core/src/java/org/apache/lucene/util/hnsw/HnswConcurrentMergeBuilder.java:
##########
@@ -132,6 +200,11 @@ public OnHeapHnswGraph build(int maxOrd) throws
IOException {
(rebalanceEndNs - rebalanceStartNs) / 1_000_000.0));
}
}
+ // join the other graphs into the base graph once it is repaired, as
MergingHnswGraphBuilder
+ // does after InitializedHnswGraphBuilder.initGraph
+ if (graphs.length > 0) {
+ joinGraphs(maxOrd, cumulativeWorkTimeNs);
Review Comment:
nit: when the base graph has deletes, rebalanceGraph() runs on the calling
thread while all workers are idle, and then the join plans are computed in
their own invokeAll. The plans only read the graphs being joined, so they don't
depend on the repair or the rebalance. They could share one invokeAll with the
rebalance, e.g. invokeAll([rebalance, plan(g1), …, plan(gG)]), so the plan
phase costs nothing when there are deletes. Not a big win since plans are
cheap, so feel free to skip.
--
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]