Skip to content

Made ITs that restart MAC faster#5246

Merged
dlmarion merged 4 commits intoapache:2.1from
dlmarion:faster-mac-restart
Jan 15, 2025
Merged

Made ITs that restart MAC faster#5246
dlmarion merged 4 commits intoapache:2.1from
dlmarion:faster-mac-restart

Conversation

@dlmarion
Copy link
Copy Markdown
Contributor

Modified MAC so that it cleaned up lock paths
in ZooKeeper and ZooCache when stopping. Noticed
that in tests that restarted MAC the Manager
process would wait for the previous lock to be
removed on the session timeout. The lock paths
would also be cached in ZooCache and not updated
right away because the Watcher would not fire
when MAC was stopped, a ConnectionLoss error
would be returned when MAC started, and it would
take a while for ZooCache to fix itself.

Modified MAC so that it cleaned up lock paths
in ZooKeeper and ZooCache when stopping. Noticed
that in tests that restarted MAC the Manager
process would wait for the previous lock to be
removed on the session timeout. The lock paths
would also be cached in ZooCache and not updated
right away because the Watcher would not fire
when MAC was stopped, a ConnectionLoss error
would be returned when MAC started, and it would
take a while for ZooCache to fix itself.
@dlmarion dlmarion added this to the 2.1.4 milestone Jan 10, 2025
@dlmarion dlmarion requested a review from ctubbsii January 10, 2025 22:53
@dlmarion dlmarion self-assigned this Jan 10, 2025
@dlmarion
Copy link
Copy Markdown
Contributor Author

These changes shaved about 30s off of VolumeIT locally for me in 2.1. In main, with more tests, it shaved off about 50s.

Copy link
Copy Markdown
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

Overall, looks good. I made a few small suggestions about the implementation. The discussion about ZooCache I think is largely a red herring. The main benefit here is just to avoid waiting for those ephemeral lock nodes to go away, and that's true regardless of what ZooCache is doing. I think ZooCache is handling the disconnect event correctly either way.

@dlmarion dlmarion merged commit 7b11821 into apache:2.1 Jan 15, 2025
@dlmarion dlmarion deleted the faster-mac-restart branch January 15, 2025 20:41
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