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