mirror of https://gitee.com/bigwinds/arangodb
minimum fixes to clear scheduler timeout problem. (#6878)
This commit is contained in:
parent
82ee14161c
commit
25bc48e548
|
@ -426,12 +426,12 @@ bool Scheduler::canPostDirectly(RequestPriority prio) const noexcept {
|
|||
switch (prio) {
|
||||
case RequestPriority::HIGH:
|
||||
// return nrWorking + nrQueued <= _maxQueuedHighPrio;
|
||||
return nrWorking + nrQueued <= _maxThreads;
|
||||
return nrWorking + nrQueued < _maxThreads;
|
||||
|
||||
case RequestPriority::LOW:
|
||||
case RequestPriority::V8:
|
||||
// return nrWorking + nrQueued <= _maxQueuedLowPrio;
|
||||
return nrWorking + nrQueued <= _maxThreads - _minThreads;
|
||||
return nrWorking + nrQueued < _maxThreads - _minThreads;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -737,10 +737,13 @@ bool Scheduler::threadShouldStop(double now) {
|
|||
// I reactivated the following at the last hour before 3.4.RC3 without
|
||||
// being able to consult with Matthew. If this breaks things, we find
|
||||
// out in due course. 12.10.2018 Max.
|
||||
|
||||
#if 0
|
||||
// decrement nrRunning by one already in here while holding the lock
|
||||
decRunning();
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Scheduler::startNewThread() {
|
||||
|
|
|
@ -53,7 +53,7 @@ class SchedulerFeature final : public application_features::ApplicationFeature {
|
|||
uint64_t queueSize() const { return _queueSize; }
|
||||
|
||||
private:
|
||||
uint64_t _nrMinimalThreads = 2;
|
||||
uint64_t _nrMinimalThreads = 0;
|
||||
uint64_t _nrMaximalThreads = 0;
|
||||
uint64_t _queueSize = 128;
|
||||
uint64_t _fifo1Size = 1024 * 1024;
|
||||
|
@ -81,4 +81,4 @@ class SchedulerFeature final : public application_features::ApplicationFeature {
|
|||
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue