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-585. Fix bug that invalid execution statistics received stats node-count mismatch
Date Fri, 25 Mar 2016 03:15:00 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 53fef5454 -> 7c2bce626


HAWQ-585. Fix bug that invalid execution statistics received stats node-count mismatch


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

Branch: refs/heads/master
Commit: 7c2bce6266f776283f9c007d3351d17f7fc2991a
Parents: 53fef54
Author: zhenglin tao <zhenglin.taozl@gmail.com>
Authored: Thu Mar 24 14:07:53 2016 +0800
Committer: zhenglin tao <zhenglin.taozl@gmail.com>
Committed: Fri Mar 25 11:03:08 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbexplain.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/7c2bce62/src/backend/cdb/cdbexplain.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbexplain.c b/src/backend/cdb/cdbexplain.c
index 7985d68..bea98ca 100644
--- a/src/backend/cdb/cdbexplain.c
+++ b/src/backend/cdb/cdbexplain.c
@@ -503,6 +503,7 @@ cdbexplain_recvExecStats(struct PlanState              *planstate,
     int             iDispatch;
     int             nDispatch;
     int             imsgptr;
+    bool            isFirstValidateStat = true;
 
     if (!planstate ||
         !planstate->instrument ||
@@ -597,7 +598,7 @@ cdbexplain_recvExecStats(struct PlanState              *planstate,
         }
 
         /* Slice should have same number of plan nodes on every qExec. */
-        if (iDispatch == 0)
+        if (isFirstValidateStat)
             ctx.nStatInst = hdr->nInst;
         else
 		{
@@ -614,13 +615,15 @@ cdbexplain_recvExecStats(struct PlanState              *planstate,
 		}
 
         /* Save lowest and highest segment id for which we have stats. */
-        if (iDispatch == 0)
+        if (isFirstValidateStat)
             ctx.segindexMin = ctx.segindexMax = hdr->segindex;
         else if (ctx.segindexMax < hdr->segindex)
             ctx.segindexMax = hdr->segindex;
         else if (ctx.segindexMin > hdr->segindex)
             ctx.segindexMin = hdr->segindex;
 
+        if (isFirstValidateStat) isFirstValidateStat = false;
+
         /* Save message ptr for easy reference. */
         ctx.msgptrs[ctx.nmsgptr] = hdr;
         ctx.nmsgptr++;


Mime
View raw message