Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize reconnectOrphanedNodes #208

Merged
merged 1 commit into from
Feb 8, 2024
Merged

optimize reconnectOrphanedNodes #208

merged 1 commit into from
Feb 8, 2024

Conversation

jbellis
Copy link
Owner

@jbellis jbellis commented Feb 8, 2024

Use a disconnected node's neighbor list for a first attempt at reconnecting it to the rest of the graph; only perform a search for more candidates if all of the neighbors are ineligible.

(Michael's profile shows that the search is overwhelmingly the most expensive part.)

this also parallelizes the reconnection operation.

Applies on top of the ExplicitThreadLocal changes.

@jbellis jbellis requested a review from jkni February 8, 2024 03:42
@jbellis jbellis force-pushed the reconnect-optimize branch from 593415b to 742cb97 Compare February 8, 2024 03:43
@jbellis
Copy link
Owner Author

jbellis commented Feb 8, 2024

This overxomplicates things, I will update tomorrow morning.

@jbellis jbellis force-pushed the reconnect-optimize branch from 742cb97 to fa51c69 Compare February 8, 2024 14:34
@jkni
Copy link
Collaborator

jkni commented Feb 8, 2024

LGTM. As noted on ETL PR, ETL is missing license header causing checks to fail. Once that's good, tests should be able to run.

@jbellis jbellis force-pushed the reconnect-optimize branch from a0b4881 to ebc4cd5 Compare February 8, 2024 18:09
@jbellis jbellis merged commit f648b67 into main Feb 8, 2024
4 checks passed
@jbellis jbellis deleted the reconnect-optimize branch February 8, 2024 18:17
if (nReconnected.get() == 0) {
break;
}
System.out.println("Pass " + i + " reconnected " + nReconnected.get() + " nodes");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to remove this line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants