hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lil...@apache.org
Subject incubator-hawq git commit: HAWQ-572. Add fault injection in parquet_getnext().
Date Wed, 30 Mar 2016 02:09:37 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master aea5e6046 -> adbf7c549


HAWQ-572. Add fault injection in parquet_getnext().


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

Branch: refs/heads/master
Commit: adbf7c549927dbeba22501c139c7819b3b94d833
Parents: aea5e60
Author: Chunling Wang <wangchunling14@126.com>
Authored: Fri Mar 25 18:23:44 2016 +0800
Committer: Lili Ma <ictmalili@gmail.com>
Committed: Wed Mar 30 10:08:44 2016 +0800

----------------------------------------------------------------------
 src/backend/access/parquet/parquetam.c         | 8 ++++++++
 src/backend/cdb/dispatcher.c                   | 2 +-
 src/backend/utils/misc/faultinjector.c         | 5 ++++-
 src/include/utils/faultinjector.h              | 3 ++-
 tools/bin/gppylib/programs/clsInjectFault.py   | 1 +
 tools/bin/hawqpylib/programs/clsInjectFault.py | 1 +
 6 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/src/backend/access/parquet/parquetam.c
----------------------------------------------------------------------
diff --git a/src/backend/access/parquet/parquetam.c b/src/backend/access/parquet/parquetam.c
index a01f89b..bec8422 100644
--- a/src/backend/access/parquet/parquetam.c
+++ b/src/backend/access/parquet/parquetam.c
@@ -266,6 +266,14 @@ void parquet_getnext(ParquetScanDesc scan, ScanDirection direction,
 	AOTupleId aoTupleId;
 	Assert(ScanDirectionIsForward(direction));
 
+#ifdef FAULT_INJECTOR
+				FaultInjector_InjectFaultIfSet(
+											   FailQeWhenParquetGetNext,
+											   DDLNotSpecified,
+											   "",	// databaseName
+											   ""); // tableName
+#endif
+
 	for(;;)
 	{
 		if(scan->bufferDone)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/src/backend/cdb/dispatcher.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/dispatcher.c b/src/backend/cdb/dispatcher.c
index ad826d3..d2ee4b7 100644
--- a/src/backend/cdb/dispatcher.c
+++ b/src/backend/cdb/dispatcher.c
@@ -1239,7 +1239,7 @@ dispatch_run(DispatchData *data)
 
 #ifdef FAULT_INJECTOR
 				FaultInjector_InjectFaultIfSet(
-											   FaillQeAfterConnection,
+											   FailQeAfterConnection,
 											   DDLNotSpecified,
 											   "",	// databaseName
 											   ""); // tableName

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/src/backend/utils/misc/faultinjector.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/faultinjector.c b/src/backend/utils/misc/faultinjector.c
index a760b4d..b1dea54 100644
--- a/src/backend/utils/misc/faultinjector.c
+++ b/src/backend/utils/misc/faultinjector.c
@@ -293,6 +293,8 @@ FaultInjectorIdentifierEnumToString[] = {
 		/* inject fault when QE actually working, set error */
 	_("fail_qe_when_begin_parquet_scan"),
 		/* inject fault when begin scan parquet table, set error */
+	_("fail_qe_when_parquet_get_next"),
+		/* inject fault when get next, set error */
 /*	_("make_dispatch_thread"),
 		 inject fault when initialing memory structure for dispatcher thread*/
 	_("before_dispatch"),
@@ -1083,7 +1085,7 @@ FaultInjector_NewHashEntry(
 		case ConnectionFailAfterGangCreation:
 		case CreateCdbDispathResultObject:
 		case WorkerManagerSubmitJob:
-		case FaillQeAfterConnection:
+		case FailQeAfterConnection:
 
 			/* These faults are designed for master. */
 			if(!AmIMaster())
@@ -1111,6 +1113,7 @@ FaultInjector_NewHashEntry(
 		case MultiExecHashLargeVmem:
 		case FailQeWhenDoQuery:
 		case FailQeWhenBeginParquetScan:
+		case FailQeWhenParquetGetNext:
 			/* SEGMENT */
 			if(!AmISegment())
 			{

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/src/include/utils/faultinjector.h
----------------------------------------------------------------------
diff --git a/src/include/utils/faultinjector.h b/src/include/utils/faultinjector.h
index 8f94349..06a3dfc 100644
--- a/src/include/utils/faultinjector.h
+++ b/src/include/utils/faultinjector.h
@@ -190,9 +190,10 @@ typedef enum FaultInjectorIdentifier_e {
 /*	MakeDispatchThread,*/
 	CreateCdbDispathResultObject,
 	WorkerManagerSubmitJob,
-	FaillQeAfterConnection,
+	FailQeAfterConnection,
 	FailQeWhenDoQuery,
 	FailQeWhenBeginParquetScan,
+	FailQeWhenParquetGetNext,
 
 	BeforeDispatch,
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/tools/bin/gppylib/programs/clsInjectFault.py
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/programs/clsInjectFault.py b/tools/bin/gppylib/programs/clsInjectFault.py
index 8c166bb..a96ca4b 100644
--- a/tools/bin/gppylib/programs/clsInjectFault.py
+++ b/tools/bin/gppylib/programs/clsInjectFault.py
@@ -411,6 +411,7 @@ class GpInjectFaultProgram:
 				  "fail_qe_after_connection (inject fault after connecting to QD, sleep to wait QE fail)"
\
 				  "fail_qe_when_do_query (inject fault when QE actually working, set error)" \
 				  "fail_qe_when_begin_parquet_scan (inject fault when begin scan parquet table, set error)"\
+				  "fail_qe_when_parquet_get_next (inject fault when get next, set error)"\
 				  "all (affects all faults injected, used for 'status' and 'reset'), ")
         addTo.add_option("-c", "--ddl_statement", dest="ddlStatement", type="string",
                          metavar="ddlStatement",

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/adbf7c54/tools/bin/hawqpylib/programs/clsInjectFault.py
----------------------------------------------------------------------
diff --git a/tools/bin/hawqpylib/programs/clsInjectFault.py b/tools/bin/hawqpylib/programs/clsInjectFault.py
index e1944fb..7281338 100644
--- a/tools/bin/hawqpylib/programs/clsInjectFault.py
+++ b/tools/bin/hawqpylib/programs/clsInjectFault.py
@@ -419,6 +419,7 @@ class HAWQInjectFaultProgram:
 				  "fail_qe_after_connection (inject fault after connecting to QD, sleep to wait QE fail)"
\
 				  "fail_qe_when_do_query (inject fault when QE actually working, set error)" \
 				  "fail_qe_when_begin_parquet_scan (inject fault when begin scan parquet table, set error)"\
+				  "fail_qe_when_parquet_get_next (inject fault when get next, set error)"\
 				  "all (affects all faults injected, used for 'status' and 'reset'), ")
         addTo.add_option("-c", "--ddl_statement", dest="ddlStatement", type="string",
                          metavar="ddlStatement",


Mime
View raw message