mirror of https://gitee.com/bigwinds/arangodb
change feature order around
This commit is contained in:
parent
f534421c74
commit
cbba71bb00
|
@ -236,6 +236,7 @@ DatabaseFeature::DatabaseFeature(ApplicationServer* server)
|
|||
setOptional(false);
|
||||
requiresElevatedPrivileges(false);
|
||||
startsAfter("Authentication");
|
||||
startsAfter("CacheManager");
|
||||
startsAfter("DatabasePath");
|
||||
startsAfter("EngineSelector");
|
||||
startsAfter("MMFilesLogfileManager");
|
||||
|
@ -243,6 +244,7 @@ DatabaseFeature::DatabaseFeature(ApplicationServer* server)
|
|||
startsAfter("MMFilesEngine");
|
||||
startsAfter("MMFilesPersistentIndex");
|
||||
startsAfter("RocksDBEngine");
|
||||
startsAfter("Scheduler");
|
||||
}
|
||||
|
||||
DatabaseFeature::~DatabaseFeature() {
|
||||
|
|
|
@ -221,7 +221,7 @@ bool Scheduler::start(ConditionVariable* cv) {
|
|||
TRI_ASSERT(_nrMinimum <= _nrDesired);
|
||||
TRI_ASSERT(_nrDesired <= _nrMaximum);
|
||||
|
||||
for (size_t i = 0; i < (size_t)_nrMinimum; ++i) {
|
||||
for (uint64_t i = 0; i < _nrMinimum; ++i) {
|
||||
startNewThread();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,29 +121,29 @@ class Scheduler {
|
|||
std::atomic<bool> _stopping;
|
||||
|
||||
// maximal number of outstanding user requests
|
||||
int64_t const _maxQueueSize;
|
||||
uint64_t const _maxQueueSize;
|
||||
|
||||
// minimum number of running SchedulerThreads
|
||||
int64_t const _nrMinimum;
|
||||
uint64_t const _nrMinimum;
|
||||
|
||||
// desired number of running SchedulerThreads
|
||||
int64_t const _nrDesired;
|
||||
uint64_t const _nrDesired;
|
||||
|
||||
// maximal number of outstanding user requests
|
||||
int64_t const _nrMaximum;
|
||||
uint64_t const _nrMaximum;
|
||||
|
||||
// number of jobs currently been worked on
|
||||
// use signed values just in case we have an underflow
|
||||
std::atomic<int64_t> _nrWorking;
|
||||
std::atomic<uint64_t> _nrWorking;
|
||||
|
||||
// number of jobs that are currently been queued, but not worked on
|
||||
std::atomic<int64_t> _nrQueued;
|
||||
std::atomic<uint64_t> _nrQueued;
|
||||
|
||||
// number of jobs that entered a potentially blocking situation
|
||||
std::atomic<int64_t> _nrBlocked;
|
||||
std::atomic<uint64_t> _nrBlocked;
|
||||
|
||||
// number of SchedulerThread that are running
|
||||
std::atomic<int64_t> _nrRunning;
|
||||
std::atomic<uint64_t> _nrRunning;
|
||||
|
||||
std::unique_ptr<JobQueue> _jobQueue;
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ SchedulerFeature::SchedulerFeature(
|
|||
: ApplicationFeature(server, "Scheduler"), _scheduler(nullptr) {
|
||||
setOptional(true);
|
||||
requiresElevatedPrivileges(false);
|
||||
startsAfter("Database");
|
||||
startsAfter("FileDescriptors");
|
||||
startsAfter("Logger");
|
||||
startsAfter("WorkMonitor");
|
||||
|
@ -260,10 +259,10 @@ bool CtrlHandler(DWORD eventType) {
|
|||
|
||||
void SchedulerFeature::buildScheduler() {
|
||||
_scheduler =
|
||||
std::make_unique<Scheduler>(static_cast<uint64_t>(_nrMinimalThreads),
|
||||
static_cast<uint64_t>(_nrServerThreads),
|
||||
static_cast<uint64_t>(_nrMaximalThreads),
|
||||
static_cast<uint64_t>(_queueSize));
|
||||
std::make_unique<Scheduler>(_nrMinimalThreads,
|
||||
_nrServerThreads,
|
||||
_nrMaximalThreads,
|
||||
_queueSize);
|
||||
|
||||
SCHEDULER = _scheduler.get();
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ class StorageEngine : public application_features::ApplicationFeature {
|
|||
// storage engines must not use elevated privileges for files etc
|
||||
requiresElevatedPrivileges(false);
|
||||
|
||||
startsAfter("CacheManager");
|
||||
startsAfter("DatabasePath");
|
||||
startsAfter("EngineSelector");
|
||||
startsAfter("FileDescriptors");
|
||||
|
|
Loading…
Reference in New Issue