Skip to content

Avoid creating a new process just to set goal state in MAC - #6582

Merged
DomGarguilo merged 3 commits into
apache:2.1from
DomGarguilo:setGoalStateMACspeedup
Oct 9, 2026
Merged

DomGarguilo merged 3 commits into
apache:2.1from
DomGarguilo:setGoalStateMACspeedup

Conversation

@DomGarguilo

Copy link
Copy Markdown
Member

MAC start-up launched a separate JVM just to run SetGoalState and waited for it before starting the manager. This PR speeds things up by doing that ZK write directly from the existing test process using the server context already available.

From some rough timing prints, the replaced goal state step went from ~1.6s -> ~0.25-0.7 seconds. Most ITs use this path so the time savings really add up over the coarse of a full build.

@DomGarguilo DomGarguilo added this to the 2.1.7 milestone Oct 8, 2026
@DomGarguilo DomGarguilo self-assigned this Oct 8, 2026

@dlmarion dlmarion left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To future-proof somewhat, you could also move the line of code in SetGoalState.main() into a public static void method that accepts a ServerContext and just call that method from here.

@DomGarguilo

Copy link
Copy Markdown
Member Author

To future-proof somewhat, you could also move the line of code in SetGoalState.main() into a public static void method that accepts a ServerContext and just call that method from here.

Good idea. Refactored into a helper method in 65f0dd8

@DomGarguilo
DomGarguilo merged commit 8a0683b into apache:2.1 Oct 9, 2026
9 checks passed
@DomGarguilo
DomGarguilo deleted the setGoalStateMACspeedup branch October 9, 2026 16:38
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