Federation: FSVolumeSet volumes is not synchronized correctly --------------------------------------------------------------
Key: HDFS-1720 URL: https://issues.apache.org/jira/browse/HDFS-1720 Project: Hadoop HDFS Issue Type: Sub-task Components: data-node Affects Versions: Federation Branch Reporter: Suresh Srinivas Assignee: Suresh Srinivas Fix For: Federation Branch Attachments: HDFS-1720.patch Currently FSVolumeSet#volumes is package private and is exposed to outside classes: # Only some methods (such as FSVolumeSet#checkDirs()) are synchronized on FSVolumeSet.this. This method changes the content of the array (sets volumes with errors to null). # Some access to volumes are synchronized by FSDataset.this. Some access are not synchronized at all. I propose making FSVolumeSet#unmodifiable list. This prevents accidental mutation from outside the class. The volumes also are created anew when modifications are made. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira