HDFS-7660. BlockReceiver#close() might be called multiple times, which causes the fsvolume reference being released incorrectly. (Lei Xu via yliu)
This commit is contained in:
parent
aee4500612
commit
5f124efb3e
@ -768,6 +768,10 @@ Release 2.7.0 - UNRELEASED
|
|||||||
HDFS-3519. Checkpoint upload may interfere with a concurrent saveNamespace.
|
HDFS-3519. Checkpoint upload may interfere with a concurrent saveNamespace.
|
||||||
(Ming Ma via cnauroth)
|
(Ming Ma via cnauroth)
|
||||||
|
|
||||||
|
HDFS-7660. BlockReceiver#close() might be called multiple times, which
|
||||||
|
causes the fsvolume reference being released incorrectly. (Lei Xu via
|
||||||
|
yliu)
|
||||||
|
|
||||||
Release 2.6.1 - UNRELEASED
|
Release 2.6.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -123,7 +123,7 @@ class BlockReceiver implements Closeable {
|
|||||||
private boolean syncOnClose;
|
private boolean syncOnClose;
|
||||||
private long restartBudget;
|
private long restartBudget;
|
||||||
/** the reference of the volume where the block receiver writes to */
|
/** the reference of the volume where the block receiver writes to */
|
||||||
private final ReplicaHandler replicaHandler;
|
private ReplicaHandler replicaHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* for replaceBlock response
|
* for replaceBlock response
|
||||||
@ -334,6 +334,7 @@ public void close() throws IOException {
|
|||||||
}
|
}
|
||||||
if (replicaHandler != null) {
|
if (replicaHandler != null) {
|
||||||
IOUtils.cleanup(null, replicaHandler);
|
IOUtils.cleanup(null, replicaHandler);
|
||||||
|
replicaHandler = null;
|
||||||
}
|
}
|
||||||
if (measuredFlushTime) {
|
if (measuredFlushTime) {
|
||||||
datanode.metrics.addFlushNanos(flushTotalNanos);
|
datanode.metrics.addFlushNanos(flushTotalNanos);
|
||||||
|
Loading…
Reference in New Issue
Block a user