Skip to content

Conversation

@ivandika3
Copy link
Contributor

@ivandika3 ivandika3 commented Jan 22, 2026

What changes were proposed in this pull request?

The root cause should be because old leader triggers StateMachine#notifyLeaderChanged and update the HA metrics only when it receives AppendEntries from the leader. Therefore, instead of relying on the AppendEntries from heartbeats, we can simply do some writes so that the old leader will be aware of the new leader.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11353

How was this patch tested?

10x10: https://github.com/ivandika3/ozone/actions/runs/21250244703

@ivandika3 ivandika3 marked this pull request as ready for review January 22, 2026 15:26
@ivandika3 ivandika3 self-assigned this Jan 22, 2026
@ivandika3 ivandika3 added the test label Jan 22, 2026
Comment on lines +514 to +516
// Do some writes so that the old leader can receive AppendEntries
// which will trigger notifyLeaderChanged, instead of relying on
// AppendEntries
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I don't think it's worth updating just for this, but if you need to change the patch for any other reason:

Suggested change
// Do some writes so that the old leader can receive AppendEntries
// which will trigger notifyLeaderChanged, instead of relying on
// AppendEntries
// Do some writes so that the old leader can receive AppendEntries
// which will trigger notifyLeaderChanged, instead of relying on
// AppendEntries from heartbeats

@adoroszlai adoroszlai changed the title HDDS-11353. Intermittent assertion failure in TestOzoneManagerHAWithStoppedNodes#testOMHAMetrics HDDS-11353. Intermittent failure in TestOzoneManagerHAWithStoppedNodes#testOMHAMetrics Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants