HDFS-5337. should do hsync for a commit request even there is no pending writes. Contributed by Brandon Li
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1530835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a75794567b
commit
7429debd86
@ -710,7 +710,8 @@ public COMMIT_STATUS checkCommit(DFSClient dfsClient, long commitOffset,
|
|||||||
LOG.debug("Got commit status: " + ret.name());
|
LOG.debug("Got commit status: " + ret.name());
|
||||||
}
|
}
|
||||||
// Do the sync outside the lock
|
// Do the sync outside the lock
|
||||||
if (ret == COMMIT_STATUS.COMMIT_DO_SYNC) {
|
if (ret == COMMIT_STATUS.COMMIT_DO_SYNC
|
||||||
|
|| ret == COMMIT_STATUS.COMMIT_FINISHED) {
|
||||||
try {
|
try {
|
||||||
// Sync file data and length
|
// Sync file data and length
|
||||||
fos.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
|
fos.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
|
||||||
|
@ -361,6 +361,9 @@ Release 2.2.1 - UNRELEASED
|
|||||||
|
|
||||||
HDFS-5281. COMMIT request should not block. (brandonli)
|
HDFS-5281. COMMIT request should not block. (brandonli)
|
||||||
|
|
||||||
|
HDFS-5337. should do hsync for a commit request even there is no pending
|
||||||
|
writes (brandonli)
|
||||||
|
|
||||||
Release 2.2.0 - 2013-10-13
|
Release 2.2.0 - 2013-10-13
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
Loading…
Reference in New Issue
Block a user