Skip to content

Conversation

@davedwwang
Copy link
Contributor

Why are the changes needed?

I hope to obtain the master-slave status of AMS through HTTP and metrics.

Close #3994.

Brief change log

Introducing a member variable to identify the master/slave status of the AMS. The HealthCheckController and AmsServiceMetrics use this field to retrieve the AMS's master/slave status.

@github-actions github-actions bot added the module:ams-server Ams server module label Dec 6, 2025
@davedwwang davedwwang force-pushed the dev/ams-ha-state branch 3 times, most recently from f530254 to d5e820d Compare December 11, 2025 01:02
@davedwwang
Copy link
Contributor Author

hi @zhoujinsong Would you mind reviewing this? I’d really appreciate it. Thanks!

Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

@davedwwang Thanks a lot for your contribution! I left a comment, PTAL.

private TServer optimizingServiceServer;
private Javalin httpServer;
private AmsServiceMetrics amsServiceMetrics;
private HAState haState = HAState.STANDBY;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add a method haState in the HighAvailabilityContainer interface.

@davedwwang davedwwang requested a review from zhoujinsong January 5, 2026 09:12
@zhoujinsong zhoujinsong changed the title [amoro-3994] Support Exposing AMS High Availability (HA) Status [AMORO-3994] Support Exposing AMS High Availability (HA) Status Jan 5, 2026
Copy link
Contributor

@zhoujinsong zhoujinsong left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks for the conrtibution!

@zhoujinsong zhoujinsong merged commit b324ae2 into apache:master Jan 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support Exposing AMS High Availability (HA) Status

2 participants