Github user liming01 commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1141#discussion_r102649930
--- Diff: src/backend/executor/nodeShareInputScan.c ---
@@ -925,9 +923,12 @@ 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;
+ if(save_errno == EBADF)
+ {
+ /* The file description is invalid, maybe this
FD has been already closed by writer in some cases
+ * we need to break here to avoid endless loop
and continue to run CHECK_FOR_INTERRUPTS.
+ */
+ break;
--- End diff --
select() ERRORS :
EBADF -- break;
EINTR -- loop
EINVAL -- programming error, should not occurs
on Linux:
ENOMEM -- loop, wait for runaway to choose one transaction to rollback, or
OS choose one process to kill
On macos:
EAGAIN -- loop
EAGAIN -- loop
So we just process the EBADF only, others are loop again or impossible to
occurs. Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---