[
https://issues.apache.org/jira/browse/HDDS-15257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gargi Jaiswal reassigned HDDS-15257:
------------------------------------
Assignee: Gargi Jaiswal
> [DiskBalancer] Add CLOSING and INVALID 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
>
> *{{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 and INVALID* 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 || state == State.INVALID) {
> 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]