diff --git a/arangod/Scheduler/Scheduler.cpp b/arangod/Scheduler/Scheduler.cpp index dc0d802e1e..c4390c93b4 100644 --- a/arangod/Scheduler/Scheduler.cpp +++ b/arangod/Scheduler/Scheduler.cpp @@ -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() { diff --git a/arangod/Scheduler/SchedulerFeature.h b/arangod/Scheduler/SchedulerFeature.h index 257d1ddd94..4873186497 100644 --- a/arangod/Scheduler/SchedulerFeature.h +++ b/arangod/Scheduler/SchedulerFeature.h @@ -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 \ No newline at end of file +#endif