hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Created: (HDFS-1720) Federation: FSVolumeSet volumes is not synchronized correctly
Date Thu, 03 Mar 2011 21:10:36 GMT
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

        

Mime
View raw message