This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d203045  HDFS-14618. Incorrect synchronization of ArrayList field 
(ArrayList is thread-unsafe). Contributed by Paul Ward.
d203045 is described below

commit d203045c3024b134d7a0417d1ea3a60d03a1534a
Author: paulward24 <[email protected]>
AuthorDate: Fri Jun 28 16:06:43 2019 -0700

    HDFS-14618. Incorrect synchronization of ArrayList field (ArrayList is 
thread-unsafe). Contributed by Paul Ward.
---
 .../hdfs/server/blockmanagement/PendingReconstructionBlocks.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
index 0f20daa..d0af60c 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingReconstructionBlocks.java
@@ -132,7 +132,9 @@ class PendingReconstructionBlocks {
   public void clear() {
     synchronized (pendingReconstructions) {
       pendingReconstructions.clear();
-      timedOutItems.clear();
+      synchronized (timedOutItems) {
+        timedOutItems.clear();
+      }
       timedOutCount = 0L;
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to