Gargi Jaiswal created HDDS-15257:
------------------------------------

             Summary: [DiskBalancer] Add CLOSING to the "not movable" check for 
containers
                 Key: HDDS-15257
                 URL: https://issues.apache.org/jira/browse/HDDS-15257
             Project: Apache Ozone
          Issue Type: Bug
            Reporter: Gargi Jaiswal


*{{isOpenToWriteState(state)}}* only returns {{true}} for {{OPEN}} and 
{{RECOVERING:}}
{{}}
{code:java}
  public static boolean isOpenToWriteState(State state) {
    return state == State.OPEN || state == State.RECOVERING;
  } {code}
{{}}
{{*CLOSING* is not covered. So when this validation in 
}}{{DiskBalancerConfiguration}}{{ runs, it only blocks }}*{{{}OPEN{}}}{{{}, 
{}}}{{{}RECOVERING{}}}{{{},{}}}* {{and}} \{*}{{}}{{DELETED}}{*}{{{}. A user who 
configures {}}}{color:#de350b}{{movableContainerStates = CLOSING}}{color}{{ 
would not get an error — the config would silently allow DiskBalancer to try to 
move containers in }}*{{CLOSING}}*{{ state.}}

{{*Fix:* }}
{{}}
{code:java}
if (HddsUtils.isOpenToWriteState(state) || state == State.CLOSING || state == 
State.DELETED) {
    throw new IllegalArgumentException("State " + name + " is not movable.");
} {code}
{{}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to