Skip to content

HDDS-15688. Retain in-memory PAUSED state when diskBalancer.info write fails on DN state change#10818

Merged
Gargi-jais11 merged 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-15688
Jul 21, 2026
Merged

HDDS-15688. Retain in-memory PAUSED state when diskBalancer.info write fails on DN state change#10818
Gargi-jais11 merged 1 commit into
apache:masterfrom
Gargi-jais11:HDDS-15688

Conversation

@Gargi-jais11

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fixes a bug where DiskBalancer could keep running on a datanode that is being decommissioned or put into maintenance.

When the datanode state changed, DiskBalancer correctly switched to PAUSED in memory. If saving that state to diskBalancer.info failed, the code switched back to RUNNING. That means container moves could continue on a node that should have stopped background work.

Fix applied :
On persist failure in nodeStateUpdated():

  1. Pausing (RUNNING → PAUSED): keep PAUSED in memory for safety
  2. Resuming (PAUSED → RUNNING): revert to PAUSED if the write fails (unchanged, already safe)

What is the link to the Apache JIRA

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

How was this patch tested?

Added unit test.

@Gargi-jais11
Gargi-jais11 marked this pull request as ready for review July 20, 2026 09:04

@ayushtkn ayushtkn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@slfan1989

Copy link
Copy Markdown
Contributor

LGTM +1

@rich7420 rich7420 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.

@Gargi-jais11
Gargi-jais11 merged commit 1975e74 into apache:master Jul 21, 2026
57 of 59 checks passed
@Gargi-jais11

Copy link
Copy Markdown
Contributor Author

Thanks @ayushtkn @slfan1989 @rich7420 for reviewing the PR.

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.

4 participants