Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
0.22.0
-
None
-
None
Description
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.