-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-11731. ContainerSafeModeRule Refactor. #7587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6b8c73b to
987505a
Compare
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nandakumar131 for the patch.
| containerManager.getContainers(), containerManager, | ||
| pipelineManager, eventQueue, serviceManager, scmContext); | ||
| containerManager, pipelineManager, eventQueue, | ||
| serviceManager, scmContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
|
Thanks @adoroszlai for the review. Addressed the review comments. |
|
Thanks @nandakumar131 for updating the patch. |
|
Thanks @adoroszlai for the review and merge! |
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