8000 remove a few unused variables from the scheduler (#13606) · arangodb/arangodb@5e19844 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5e19844

Browse files
authored
remove a few unused variables from the scheduler (#13606)
1 parent 1068d91 commit 5e19844

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

arangod/Scheduler/SupervisedScheduler.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -490,22 +490,14 @@ void SupervisedScheduler::runSupervisor() {
490490
startOneThread();
491491
}
492492

493-
uint64_t lastJobsDone = 0, lastJobsSubmitted = 0;
494-
uint64_t jobsStallingTick = 0, lastQueueLength = 0;
495-
493+
uint64_t lastJobsSubmitted = 0;
494+
uint64_t lastQueueLength = 0;
496495
uint64_t roundCount = 0;
497496

498497
while (!_stopping) {
499498
uint64_t jobsSubmitted = _jobsSubmitted.load(std::memory_order_acquire);
500499
uint64_t jobsDone = _jobsDone.load(std::memory_order_acquire);
501500
uint64_t jobsDequeued = _jobsDequeued.load(std::memory_order_relaxed);
502-
503-
if (jobsDone == lastJobsDone && (jobsDequeued < jobsSubmitted)) {
504-
jobsStallingTick++;
505-
} else if (jobsStallingTick != 0) {
506-
jobsStallingTick--;
507-
}
508-
509501
uint64_t queueLength = jobsSubmitted - jobsDequeued;
510502

511503
uint64_t numAwake = _numAwake.load(std::memory_order_relaxed);
@@ -522,7 +514,6 @@ void SupervisedScheduler::runSupervisor() {
522514
((queueLength == 0) && (lastQueueLength == 0))) &&
523515
((rand() & 0x3F) == 0) && sleeperFound;
524516

525-
lastJobsDone = jobsDone;
526517
lastQueueLength = queueLength;
527518
lastJobsSubmitted = jobsSubmitted;
528519

@@ -542,7 +533,6 @@ void SupervisedScheduler::runSupervisor() {
542533
bool haveStartedThread = false;
543534

544535
if (doStartOneThread && _numWorkers < _maxNumWorkers) {
545-
jobsStallingTick = 0;
546536
startOneThread();
547537
haveStartedThread = true;
548538
} else if (doStopOneThread && _numWorkers > _minNumWorkers) {

0 commit comments

Comments
 (0)
0