HDFS-14618. Incorrect synchronization of ArrayList field (ArrayList is thread-unsafe). Contributed by Paul Ward.

This commit is contained in:
paulward24 2019-06-28 16:06:43 -07:00 committed by Anu Engineer
parent da568996af
commit d203045c30

View File

@ -132,7 +132,9 @@ void remove(BlockInfo block) {
public void clear() { public void clear() {
synchronized (pendingReconstructions) { synchronized (pendingReconstructions) {
pendingReconstructions.clear(); pendingReconstructions.clear();
synchronized (timedOutItems) {
timedOutItems.clear(); timedOutItems.clear();
}
timedOutCount = 0L; timedOutCount = 0L;
} }
} }