Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Federation Branch
-
None
-
Reviewed
Description
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.