HDDS-11731. ContainerSafeModeRule Refactor.#7587
Merged
adoroszlai merged 4 commits intoapache:masterfrom Jan 4, 2025
Merged
Conversation
6b8c73b to
987505a
Compare
adoroszlai
reviewed
Jan 3, 2025
Contributor
adoroszlai
left a comment
There was a problem hiding this comment.
Thanks @nandakumar131 for the patch.
Comment on lines
-850
to
+851
| containerManager.getContainers(), containerManager, | ||
| pipelineManager, eventQueue, serviceManager, scmContext); | ||
| containerManager, pipelineManager, eventQueue, | ||
| serviceManager, scmContext); |
Contributor
There was a problem hiding this comment.
nit: previous indent was correct
...hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/safemode/ContainerSafeModeRule.java
Outdated
Show resolved
Hide resolved
…m/safemode/ContainerSafeModeRule.java Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
Contributor
Author
|
Thanks @adoroszlai for the review. Addressed the review comments. |
adoroszlai
approved these changes
Jan 4, 2025
Contributor
|
Thanks @nandakumar131 for updating the patch. |
Contributor
Author
|
Thanks @adoroszlai for the review and merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
ContainerSafeModeRule Refactor
Currently, the Safemode Rule validation is driven by processing of reports sent by Datanodes, this is unnecessary and this also introduces additional complexity as the
ContainerSafeModeRuleis maintaining the same information that theContainerManageris maintaining.Since the information about
Containersare maintained at two different places, this can go out of sync and introduce bugs intoContainerSafeModeRulelogic. (eg: HDDS-5263)We will move to a simpler model where
ContainerSafeModeRulewill not care about report processing but checkContainerManagerto validate the rule.This is part-1 of the change where we introduce logic to use
ContainerManagerfor rule validation, this new logic is disabled by default (usingvalidateBasedOnReportProcessingflag). The new logic will be enabled once all theSafeModeRulesare updated with new logic.What is the link to the Apache JIRA
HDDS-11731
How was this patch tested?
Existing unit and acceptance tests.
Additional unit test will be added in HDDS-12000