File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,7 @@ MaintenanceFeature::MaintenanceFeature(application_features::ApplicationServer&
68
68
: ApplicationFeature(server, " Maintenance" ),
69
69
_forceActivation(false ),
70
70
_maintenanceThreadsMax(2 ),
71
- _resignLeadershipOnShutdown(false ),
72
- _currentCounter(0 ) {
71
+ _resignLeadershipOnShutdown(false ) {
73
72
// the number of threads will be adjusted later. it's just that we want to
74
73
// initialize all members properly
75
74
@@ -354,16 +353,6 @@ void MaintenanceFeature::beginShutdown() {
354
353
} // MaintenanceFeature
355
354
356
355
void MaintenanceFeature::stop () {
357
- // There should be no new workers.
358
- // Current workers could be stuck on the condition variable.
359
- // Let's wake them up now.
360
- {
361
- // Only if we have flagged shutdown this operation is safe, all other threads potentially
362
- // trying to get this mutex get into the shutdown case now, instead of getting into wait state.
363
- TRI_ASSERT (_isShuttingDown);
364
- std::unique_lock<std::mutex> guard (_currentCounterLock);
365
- _currentCounterCondition.notify_all ();
366
- }
367
356
for (auto const & itWorker : _activeWorkers) {
368
357
CONDITION_LOCKER (cLock, _workerCompletion);
369
358
Original file line number Diff line number Diff line change 34
34
#include " ProgramOptions/ProgramOptions.h"
35
35
#include " RestServer/MetricsFeature.h"
36
36
37
+ #include < memory>
38
+ #include < mutex>
37
39
#include < queue>
38
40
39
41
namespace arangodb {
@@ -423,15 +425,6 @@ class MaintenanceFeature : public application_features::ApplicationFeature {
423
425
424
426
std::atomic<std::chrono::steady_clock::duration> _pauseUntil;
425
427
426
- // / @brief Mutex for the current counter condition variable
427
- mutable std::mutex _currentCounterLock;
428
-
429
- // / @brief Condition variable where Actions can wait on until _currentCounter increased
430
- std::condition_variable _currentCounterCondition;
431
-
432
- // / @brief counter for load_current requests.
433
- uint64_t _currentCounter;
434
-
435
428
public:
436
429
std::optional<std::reference_wrapper<Histogram<log_scale_t <uint64_t >>>> _phase1_runtime_msec;
437
430
std::optional<std::reference_wrapper<Histogram<log_scale_t <uint64_t >>>> _phase2_runtime_msec;
You can’t perform that action at this time.
0 commit comments