You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by br...@apache.org on 2013/10/10 02:52:54 UTC
svn commit: r1530835 - in /hadoop/common/trunk/hadoop-hdfs-project:
hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
hadoop-hdfs/CHANGES.txt
Author: brandonli
Date: Thu Oct 10 00:52:54 2013
New Revision: 1530835
URL: http://svn.apache.org/r1530835
Log:
HDFS-5337. should do hsync for a commit request even there is no pending writes. Contributed by Brandon Li
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java?rev=1530835&r1=1530834&r2=1530835&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs-nfs/src/main/java/org/apache/hadoop/hdfs/nfs/nfs3/OpenFileCtx.java Thu Oct 10 00:52:54 2013
@@ -710,7 +710,8 @@ class OpenFileCtx {
LOG.debug("Got commit status: " + ret.name());
}
// 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 {
// Sync file data and length
fos.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH));
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1530835&r1=1530834&r2=1530835&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Oct 10 00:52:54 2013
@@ -361,6 +361,9 @@ Release 2.2.1 - UNRELEASED
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
INCOMPATIBLE CHANGES