Details
Description
Similar to the work done in HDFS-4591 to avoid having to take a write lock before checking if an operation category is allowed, we can do the same for the write lock that is taken sometimes (when updating access time) within getBlockLocations.
This is particularly useful when using the standby read feature (HDFS-12943), as it will be the case on an observer node that the operationCategory(READ) check succeeds but the operationCategory(WRITE) check fails. It would be ideal to fail this check before acquiring the write lock.
Attachments
Attachments
Issue Links
- is depended upon by
-
HADOOP-15509 Release Hadoop 2.7.7
- Resolved
Thanks xkrogen for creating this JIRA. Submitted patch v0 to do the double-check for getBlockLocations, as suggested in
HDFS-4591.