-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-13500. Synchronizing iteration of Configuration properties object #3775
Conversation
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dbadaya1, thank you for providing the patch. Would you fix the check style issue?
./hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java:2981: Properties properties = getProps();:16: 'properties' hides a field. [HiddenField]
./hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/conf/TestConfiguration.java:2695: Configuration conf = new Configuration();:19: 'conf' hides a field. [HiddenField]
We need to rename the variables to fix the warnings.
… in Configuration class It is possible to encounter a ConcurrentModificationException while trying to iterate a Configuration object. The iterator method tries to walk the underlying Property object without proper synchronization, so another thread simultaneously calling the set method can trigger it. setProperty method on Property object is also synchronized on the same property object.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. The unit test failure is not related and tracked by https://issues.apache.org/jira/browse/HADOOP-18046
…ect (#3775) Signed-off-by: Akira Ajisaka <[email protected]> (cherry picked from commit 4483607)
…ect (#3775) Signed-off-by: Akira Ajisaka <[email protected]> (cherry picked from commit 4483607)
…ect (#3775) Signed-off-by: Akira Ajisaka <[email protected]> (cherry picked from commit 4483607) (cherry picked from commit 253b217)
…ect (apache#3775) Signed-off-by: Akira Ajisaka <[email protected]>
…ect (#3775) Signed-off-by: Akira Ajisaka <[email protected]> (cherry picked from commit 4483607)
…ect (apache#3775) Signed-off-by: Akira Ajisaka <[email protected]>
Description of PR
It is possible to encounter a ConcurrentModificationException while trying to iterate a Configuration object. The iterator method tries to walk the underlying Property object without proper synchronization, so another thread simultaneously calling the set method can trigger it. setProperty method on Property object is also synchronized on the same property object.
How was this patch tested?
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?