This is an automated email from the ASF dual-hosted git repository.
arp pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-2.8 by this push:
new 3c145a7 HDFS-14219. ConcurrentModificationException occurs in
datanode occasionally. Contributed by Tao Jie.
3c145a7 is described below
commit 3c145a7ef0171ef248d7916c366778de95bc0d4b
Author: Arpit Agarwal <[email protected]>
AuthorDate: Wed Feb 20 15:04:33 2019 -0800
HDFS-14219. ConcurrentModificationException occurs in datanode
occasionally. Contributed by Tao Jie.
---
.../hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
index 36d68d0..b14f9e9 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
@@ -1876,7 +1876,7 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl>
{
new HashMap<String, BlockListAsLongs.Builder>();
List<FsVolumeImpl> curVolumes = null;
- synchronized(this) {
+ try (AutoCloseableLock lock = datasetLock.acquire()) {
curVolumes = volumes.getVolumes();
for (FsVolumeSpi v : curVolumes) {
builders.put(v.getStorageID(),
BlockListAsLongs.builder(maxDataLength));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]