HDFS-10617. PendingReconstructionBlocks.size() should be synchronized. Contributed by Eric Badger.
This commit is contained in:
parent
728bf7f698
commit
2bbc3ea1b5
|
@ -134,7 +134,9 @@ class PendingReconstructionBlocks {
|
||||||
* The total number of blocks that are undergoing reconstruction.
|
* The total number of blocks that are undergoing reconstruction.
|
||||||
*/
|
*/
|
||||||
int size() {
|
int size() {
|
||||||
return pendingReconstructions.size();
|
synchronized (pendingReconstructions) {
|
||||||
|
return pendingReconstructions.size();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue