You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Hui Fei (Jira)" <ji...@apache.org> on 2021/11/25 08:20:00 UTC

[jira] [Commented] (HDDS-5671) ContainerBalancer#stop should prevent the current balancing thread from interrupting itself.

    [ https://issues.apache.org/jira/browse/HDDS-5671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17449011#comment-17449011 ] 

Hui Fei commented on HDDS-5671:
-------------------------------

[~siddhantsangwan] 1.2.0 is already released, but it does not include this fix, yes? 

> ContainerBalancer#stop should prevent the current balancing thread from interrupting itself.
> --------------------------------------------------------------------------------------------
>
>                 Key: HDDS-5671
>                 URL: https://issues.apache.org/jira/browse/HDDS-5671
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: SCM
>            Reporter: Siddhant Sangwan
>            Assignee: Siddhant Sangwan
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.2.0
>
>
> If the current thread calls the ContainerBalancer#stop method, it ends up calling interrupt and join on itself.
> {code:title=ContainerBalancer#stop}
> balancerRunning = false;
> currentBalancingThread.interrupt();
> currentBalancingThread.join(1000);
> {code}
> This causes:
> {quote}
> [ContainerBalancer] WARN  balancer.ContainerBalancer (ContainerBalancer.java:stop(731)) - Interrupted while waiting for balancing thread to join.
> [ContainerBalancer] INFO  balancer.ContainerBalancer (ContainerBalancer.java:stop(736)) - Container Balancer stopped successfully.
> {quote}
> The current thread should be prevented from interrupting itself. The interrupt and join calls are required when ContainerBalancer#stop has been called from a different thread and balancer needs to stop gracefully.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org