[ 
https://issues.apache.org/jira/browse/HDDS-15257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sammi Chen resolved HDDS-15257.
-------------------------------
    Fix Version/s: 2.2.0
       Resolution: Fixed

> [DiskBalancer] Add CLOSING state to the "not movable" check
> -----------------------------------------------------------
>
>                 Key: HDDS-15257
>                 URL: https://issues.apache.org/jira/browse/HDDS-15257
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Gargi Jaiswal
>            Assignee: Gargi Jaiswal
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.2.0
>
>
> *{{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