Merge pull request #642 from citusdata/bugfix/realtime_poll_timeout

Fix bug related to poll timeout
pull/672/head
Önder Kalacı 2016-07-26 10:21:37 +03:00 committed by GitHub
commit 34d3df5a7b
1 changed files with 3 additions and 3 deletions

View File

@ -800,14 +800,14 @@ MultiClientRegisterWait(WaitInfo *waitInfo, TaskExecutionStatus executionStatus,
void
MultiClientWait(WaitInfo *waitInfo)
{
long sleepIntervalPerCycle = RemoteTaskCheckInterval * 1000L;
/*
* If we had a failure, we always want to sleep for a bit, to prevent
* flooding the other system, probably making the situation worse.
*/
if (waitInfo->haveFailedWaiter)
{
long sleepIntervalPerCycle = RemoteTaskCheckInterval * 1000L;
pg_usleep(sleepIntervalPerCycle);
return;
}
@ -828,7 +828,7 @@ MultiClientWait(WaitInfo *waitInfo)
* times as long.
*/
int rc = poll(waitInfo->pollfds, waitInfo->registeredWaiters,
sleepIntervalPerCycle * 10);
RemoteTaskCheckInterval * 10);
if (rc < 0)
{