You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2016/01/21 07:23:48 UTC

incubator-hawq git commit: HAWQ-290. Add faultinjector for test.

Repository: incubator-hawq
Updated Branches:
  refs/heads/master e21d5257e -> 6cf15d34a


HAWQ-290. Add faultinjector for test.


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

Branch: refs/heads/master
Commit: 6cf15d34aaf53f8b6e89cd368d742ab454f440ef
Parents: e21d525
Author: doli <do...@pivotal.io>
Authored: Thu Jan 21 14:11:34 2016 +0800
Committer: doli <do...@pivotal.io>
Committed: Thu Jan 21 14:11:34 2016 +0800

----------------------------------------------------------------------
 src/backend/access/transam/xact.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/6cf15d34/src/backend/access/transam/xact.c
----------------------------------------------------------------------
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 784e883..cfb5351 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -2325,6 +2325,13 @@ CommitTransaction(void)
 	 * We don't need to worry about inconsistent states between them. So no
 	 * CHECKPOINT_START_LOCK any more.
 	 */
+#ifdef FAULT_INJECTOR
+	FaultInjector_InjectFaultIfSet(
+			Checkpoint,
+			DDLNotSpecified,
+			"",	// databaseName
+			""); // tableName
+#endif
 
 	/* Prevent cancel/die interrupt while cleaning up */
 	HOLD_INTERRUPTS();
@@ -2813,7 +2820,13 @@ AbortTransaction(void)
 	 * We don't need to worry about inconsistent states between them. So no
 	 * CHECKPOINT_START_LOCK any more.
 	 */
-
+#ifdef FAULT_INJECTOR
+	FaultInjector_InjectFaultIfSet(
+			Checkpoint,
+			DDLNotSpecified,
+			"",	// databaseName
+			""); // tableName
+#endif
 	/*
 	 * Advertise the fact that we aborted in pg_clog (assuming that we got as
 	 * far as assigning an XID to advertise).