HDFS-15796. ConcurrentModificationException error happens on NameNode occasionally. Contributed by Daniel Ma

This commit is contained in:
S O'Donnell 2021-07-09 10:03:57 +01:00
parent 6450c1ea9a
commit b6c06c4b76

View File

@ -333,7 +333,7 @@ List<DatanodeStorageInfo> getTargets(BlockInfo block) {
synchronized (pendingReconstructions) {
PendingBlockInfo found = pendingReconstructions.get(block);
if (found != null) {
return found.targets;
return new ArrayList<>(found.targets);
}
}
return null;