HDFS-14798. Synchronize invalidateBlocks in DatanodeDescriptor. Contributed by hemanthboyina.
This commit is contained in:
parent
d1c303a497
commit
2ff2a7f612
2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
Normal file → Executable file
2
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeDescriptor.java
Normal file → Executable file
|
@ -339,7 +339,9 @@ public class DatanodeDescriptor extends DatanodeInfo {
|
|||
|
||||
public void resetBlocks() {
|
||||
updateStorageStats(this.getStorageReports(), 0L, 0L, 0, 0, null);
|
||||
synchronized (invalidateBlocks) {
|
||||
this.invalidateBlocks.clear();
|
||||
}
|
||||
this.volumeFailures = 0;
|
||||
// pendingCached, cached, and pendingUncached are protected by the
|
||||
// FSN lock.
|
||||
|
|
Loading…
Reference in New Issue