hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weic...@apache.org
Subject [hadoop] branch branch-3.2 updated: HDFS-14618. Incorrect synchronization of ArrayList field (ArrayList is thread-unsafe). Contributed by Paul Ward.
Date Wed, 02 Oct 2019 22:09:23 GMT
This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


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

commit 0559c1dba34374576c722f8766de4065971d0998
Author: paulward24 <52216289+paulward24@users.noreply.github.com>
AuthorDate: Fri Jun 28 16:06:43 2019 -0700

    HDFS-14618. Incorrect synchronization of ArrayList field (ArrayList is thread-unsafe).
Contributed by Paul Ward.
    
    (cherry picked from commit d203045c3024b134d7a0417d1ea3a60d03a1534a)
---
 .../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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message