diff options
Diffstat (limited to 'src/mongo/db/storage/flow_control.cpp')
-rw-r--r-- | src/mongo/db/storage/flow_control.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/storage/flow_control.cpp b/src/mongo/db/storage/flow_control.cpp index 3f1d2e0fec3..df076e2d82c 100644 --- a/src/mongo/db/storage/flow_control.cpp +++ b/src/mongo/db/storage/flow_control.cpp @@ -134,12 +134,13 @@ FlowControl::FlowControl(ServiceContext* service, repl::ReplicationCoordinator* // cause a slow start on start up. FlowControlTicketholder::set(service, std::make_unique<FlowControlTicketholder>(_kMaxTickets)); - service->getPeriodicRunner()->scheduleJob( + _jobAnchor = service->getPeriodicRunner()->makeJob( {"FlowControlRefresher", [this](Client* client) { FlowControlTicketholder::get(client->getServiceContext())->refreshTo(getNumTickets()); }, Seconds(1)}); + _jobAnchor.start(); } FlowControl* FlowControl::get(ServiceContext* service) { |