Skip to content

HDDS-15369. Fix datanode shutdown on ozone.scm.nodes reconfig#10358

Merged
adoroszlai merged 1 commit into
apache:masterfrom
xichen01:HDDS-15369
May 26, 2026
Merged

HDDS-15369. Fix datanode shutdown on ozone.scm.nodes reconfig#10358
adoroszlai merged 1 commit into
apache:masterfrom
xichen01:HDDS-15369

Conversation

@xichen01
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Issue

  1. When reconfiguring and removing SCM, the connectionManager.removeSCMServer is called, in the removeSCMServer, the endpoint State will be set to SHUTDOWN
  2. However, the rule for RunningDatanodeState is: whenever any endpoint task returns SHUTDOWN, the entire DN state machine switches to SHUTDOWN, this will cause the DN exceptional shutdown.

FIx

Do not set the endpoint to be removed to the SHUTDOWN state

What is the link to the Apache JIRA

HDDS-15369

How was this patch tested?

unit test

Copy link
Copy Markdown
Contributor

@ivandika3 ivandika3 left a comment

Choose a reason for hiding this comment

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

LGTM +1. Thanks for catching this bug.

@ivandika3 ivandika3 added the bug Something isn't working label May 26, 2026
@adoroszlai adoroszlai merged commit 0e51694 into apache:master May 26, 2026
47 checks passed
Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @xichen01 for the patch, @ivandika3 for the review.

Comment on lines +45 to +46
Assertions.assertTrue(connectionManager.getValues().isEmpty());
Assertions.assertEquals(HEARTBEAT, endpoint.getState());
Copy link
Copy Markdown
Contributor

@adoroszlai adoroszlai May 26, 2026

Choose a reason for hiding this comment

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

nit:

  • Please use assertThat(connectionManager.getValues()).isEmpty(), which provides more useful message if the assertion fails, see HDDS-9951.
  • Please add static import for assertions (and mocks, when used), see HDDS-9961.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants