mirror of https://github.com/citusdata/citus.git
Merge pull request #642 from citusdata/bugfix/realtime_poll_timeout
Fix bug related to poll timeoutpull/672/head
commit
34d3df5a7b
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue