hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ztao1...@apache.org
Subject incubator-hawq git commit: HAWQ-489. Add missing errno for libhdfs function call.
Date Mon, 07 Mar 2016 05:47:54 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 4a4631027 -> 17181fbe1


HAWQ-489. Add missing errno for libhdfs function call.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/17181fbe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/17181fbe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/17181fbe

Branch: refs/heads/master
Commit: 17181fbe1717f48fed7313dd2e10a2ef270c3634
Parents: 4a46310
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Authored: Mon Mar 7 13:46:37 2016 +0800
Committer: zhenglin tao <zhenglin.taozl@gmail.com>
Committed: Mon Mar 7 13:46:37 2016 +0800

----------------------------------------------------------------------
 src/backend/storage/file/fd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/17181fbe/src/backend/storage/file/fd.c
----------------------------------------------------------------------
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 627de95..e550307 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -3031,7 +3031,7 @@ HdfsFileTruncate(File file, int64 offset)
 	if (0 != HdfsTruncate(protocol, fs, path, offset))
 	{
 		errno = EIO;
-	    return -1;
+		return -1;
 	}
 
 	pfree(protocol);
@@ -3048,6 +3048,7 @@ HdfsFileTruncate(File file, int64 offset)
 			(errcode(ERRCODE_IO_ERROR),
 					errmsg("cannot reopen file %s after truncate, errno %d", VfdCache[file].fileName, errno),
 					errdetail("%s", HdfsGetLastError())));
+		errno = EIO;
 		return -1;
 	}
 
@@ -3073,6 +3074,7 @@ HdfsFileTruncate(File file, int64 offset)
 			(errcode(ERRCODE_IO_ERROR),
 					errmsg("cannot get file length for file %s after truncate, errno %d", VfdCache[file].fileName,
errno),
 					errdetail("%s", HdfsGetLastError())));
+		errno = EIO;
 		return -1;
 	}
 


Mime
View raw message