Description
For getBlockLocations() call, the read lock is acquired when doing permission check. But unlike other namenode methods, this is outside of the lock of the actual operation. So it ends up acquiring and releasing the lock twice. This has two implications.
- permissions can change in between the locks
- the lock fairness will penalize getBlockLocations().
This was fixed in trunk and branch-2 as a part of HDFS-4679, but not in branch-0.23.