Balancer shutdown synchronisation could do with a review
--------------------------------------------------------

                 Key: HDFS-852
                 URL: https://issues.apache.org/jira/browse/HDFS-852
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: balancer
    Affects Versions: 0.22.0
            Reporter: Steve Loughran
            Priority: Minor


Looking at the source of the Balancer, there's a lot 
{{catch(InterruptedException)}} clauses, which runs the risk of swallowing 
exceptions, making it harder to shut down a balancer.

for example, the {{AccessKeyUpdater swallows the InterruptedExceptions which 
get used to tell it to shut down, and while it does poll the shared field 
{{shouldRun}}, that field isn't volatile: the shutdown may }}not work. 

Elsewhere, the {{dispatchBlocks()}} method swallows interruptions without even 
looking for any shutdown flag. 

This is all minor as it is shutdown logic, but it is the stuff that it hard to 
test and leads to problems in the field, the problems that leave the ops team 
resorting to {{kill -9}}, and we don't want that.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to