HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.
This commit is contained in:
parent
b95f1af8a9
commit
dba8eee899
|
@ -134,8 +134,10 @@ class PendingReplicationBlocks {
|
|||
* The total number of blocks that are undergoing replication
|
||||
*/
|
||||
int size() {
|
||||
synchronized(pendingReplications) {
|
||||
return pendingReplications.size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* How many copies of this block is pending replication?
|
||||
|
|
Loading…
Reference in New Issue