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 2017/01/19 08:03:24 UTC
incubator-hawq git commit: HAWQ-1282. Shared Input Scan may result in
endless loop.
Repository: incubator-hawq
Updated Branches:
refs/heads/master 326fa4f91 -> efa1230a9
HAWQ-1282. Shared Input Scan may result in endless loop.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/efa1230a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/efa1230a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/efa1230a
Branch: refs/heads/master
Commit: efa1230a95133c954f843f4ced46fab6acdfd7d2
Parents: 326fa4f
Author: hubertzhang <hu...@apache.org>
Authored: Thu Jan 19 13:58:48 2017 +0800
Committer: hubertzhang <hu...@apache.org>
Committed: Thu Jan 19 16:02:32 2017 +0800
----------------------------------------------------------------------
src/backend/executor/nodeShareInputScan.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/efa1230a/src/backend/executor/nodeShareInputScan.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/nodeShareInputScan.c b/src/backend/executor/nodeShareInputScan.c
index cb303be..0f08848 100644
--- a/src/backend/executor/nodeShareInputScan.c
+++ b/src/backend/executor/nodeShareInputScan.c
@@ -640,8 +640,13 @@ read_retry:
else if(sz == 0 || errno == EINTR)
goto read_retry;
else
+ {
+ if(fd >= 0)
+ {
+ gp_retry_close(fd);
+ }
elog(ERROR, "could not read from fifo: %m");
-
+ }
Assert(!"Never be here");
return 0;
}
@@ -658,7 +663,13 @@ write_retry:
else if(sz == 0 || errno == EINTR)
goto write_retry;
else
+ {
+ if(fd >= 0)
+ {
+ gp_retry_close(fd);
+ }
elog(ERROR, "could not write to fifo: %m");
+ }
Assert(!"Never be here");
return 0;
@@ -914,6 +925,10 @@ writer_wait_for_acks(ShareInput_Lk_Context *pctxt, int share_id, int xslice)
int save_errno = errno;
elog(LOG, "SISC WRITER (shareid=%d, slice=%d): notify still wait for an answer, errno %d",
share_id, currentSliceId, save_errno);
+ /*if error(except EINTR) happens in select, we just return to avoid endless loop*/
+ if(errno != EINTR){
+ return;
+ }
}
}
}