hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-633. Don't error out if we cannot delete workfile directory during AbortTransaction.
Date Thu, 07 Apr 2016 02:48:00 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 52da49ebe -> e0c96582e


HAWQ-633. Don't error out if we cannot delete workfile directory during AbortTransaction.


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

Branch: refs/heads/master
Commit: e0c96582ea5b78618511e5b1a451a62e223a5c8f
Parents: 52da49e
Author: George Caragea <gcaragea@pivotal.io>
Authored: Wed Apr 6 11:52:56 2016 -0700
Committer: Ming LI <mli@pivotal.io>
Committed: Thu Apr 7 10:45:15 2016 +0800

----------------------------------------------------------------------
 src/backend/utils/workfile_manager/workfile_mgr.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/e0c96582/src/backend/utils/workfile_manager/workfile_mgr.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/workfile_manager/workfile_mgr.c b/src/backend/utils/workfile_manager/workfile_mgr.c
index 1cce5aa..259686d 100644
--- a/src/backend/utils/workfile_manager/workfile_mgr.c
+++ b/src/backend/utils/workfile_manager/workfile_mgr.c
@@ -759,7 +759,14 @@ workfile_mgr_unlink_directory(const char *dirpath)
 
 	if (!res)
 	{
-		ereport(ERROR,
+		int error_level = ERROR;
+
+		/* If we are already in an abort transaction, don't throw an exception */
+		if (IsAbortInProgress())
+		{
+			error_level = WARNING;
+		}
+		ereport(error_level,
 				(errcode(ERRCODE_IO_ERROR),
 				errmsg("could not remove spill file directory")));
 	}


Mime
View raw message