mirror of https://github.com/citusdata/citus.git
Create a variable SLOW_START_DISABLED (#3593)
When ExecutorSlowStartInterval is set to 0, it has a special meaning that we do not want to use slow start. Therefore, in the code we have checks such as ExecutorSlowStartInterval > 0 to understand if it is enabled or not. However, this is kind of subtle, and it creates an extra mapping in our mind. Therefore, I thought that using a variable for the special value removes the mapping and makes it easier to understand.pull/3596/head
parent
2595b4864b
commit
4509d9a72b
|
@ -165,6 +165,8 @@
|
|||
#include "utils/memutils.h"
|
||||
#include "utils/timestamp.h"
|
||||
|
||||
#define SLOW_START_DISABLED 0
|
||||
|
||||
|
||||
/*
|
||||
* DistributedExecution represents the execution of a distributed query
|
||||
|
@ -2257,7 +2259,7 @@ ManageWorkerPool(WorkerPool *workerPool)
|
|||
*/
|
||||
newConnectionCount = Min(newConnectionsForReadyTasks, maxNewConnectionCount);
|
||||
|
||||
if (newConnectionCount > 0 && ExecutorSlowStartInterval > 0)
|
||||
if (newConnectionCount > 0 && ExecutorSlowStartInterval != SLOW_START_DISABLED)
|
||||
{
|
||||
if (MillisecondsPassedSince(workerPool->lastConnectionOpenTime) >=
|
||||
ExecutorSlowStartInterval)
|
||||
|
|
Loading…
Reference in New Issue