[ https://issues.apache.org/jira/browse/HDFS-11267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15784978#comment-15784978 ]
Hadoop QA commented on HDFS-11267: ---------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 4s{color} | {color:red} HDFS-11267 does not apply to trunk. Rebase required? Wrong Branch? See https://wiki.apache.org/hadoop/HowToContribute for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HDFS-11267 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12845033/HDFS-11267.03.patch | | Console output | https://builds.apache.org/job/PreCommit-HDFS-Build/17984/console | | Powered by | Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org | This message was automatically generated. > Avoid redefinition of storageDirs in NNStorage and cleanup its accessors in > Storage > ----------------------------------------------------------------------------------- > > Key: HDFS-11267 > URL: https://issues.apache.org/jira/browse/HDFS-11267 > Project: Hadoop HDFS > Issue Type: Bug > Affects Versions: 3.0.0-alpha1 > Reporter: Manoj Govindassamy > Assignee: Manoj Govindassamy > Attachments: HDFS-11267.01.patch, HDFS-11267.02.patch, > HDFS-11267.03.patch > > > In the abstract class {{Storage}}, {{storageDirs}} is a protected variable > and all its derived classes like {{NNStorage}}, {{JNStorage}}, > {{DataStorage}}.. are iterating over this non-thread safe variable without > any proper locks. Any parallel modification operation like add or remove > volume can mutate the backing storageDirs list and any iterators on this list > around the same time can face {{ConcurrentModificationException}}. It would > be good to make the variable private and restrict the access via getters and > setters. Any thread safe restriction need to be done can then be placed on > the parent class only. > Also, {{NNStorage}} redefines parent class Storage's {{storageDirs}}, making > it inconsistent with other derived classes. Would be cleaner if {{NNStorage}} > can avoid re-defining it locally. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org