1
0
Fork 0

change feature order around

This commit is contained in:
jsteemann 2017-05-10 14:29:20 +02:00
parent f534421c74
commit cbba71bb00
5 changed files with 16 additions and 14 deletions

View File

@ -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() {

View File

@ -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();
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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");