HDFS-8626. Reserved RBW space is not released if creation of RBW File fails. (Contributed by kanaka kumar avvaru)
This commit is contained in:
parent
d06080bbb5
commit
dc4171cb66
|
@ -140,6 +140,9 @@ Release 2.7.1 - UNRELEASED
|
|||
HDFS-8633. Fix setting of dfs.datanode.readahead.bytes in hdfs-default.xml
|
||||
to match DFSConfigKeys. (Ray Chiang via Yongjun Zhang)
|
||||
|
||||
HDFS-8626. Reserved RBW space is not released if creation of RBW File
|
||||
fails. (kanaka kumar avvaru via Arpit Agarwal)
|
||||
|
||||
Release 2.7.0 - 2015-04-20
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -759,7 +759,12 @@ public class FsVolumeImpl implements FsVolumeSpi {
|
|||
File createRbwFile(String bpid, Block b) throws IOException {
|
||||
checkReference();
|
||||
reserveSpaceForRbw(b.getNumBytes());
|
||||
try {
|
||||
return getBlockPoolSlice(bpid).createRbwFile(b);
|
||||
} catch (IOException exception) {
|
||||
releaseReservedSpace(b.getNumBytes());
|
||||
throw exception;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue