It is helpful to set this to 1 for tests.
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit
8129d6bb953015cc05db458afa6aa9b8f5f62614)
Conflicts:
src/common/options/global.yaml.in
.set_description("Maximum threadpool size of AsyncMessenger")
.add_see_also("ms_async_op_threads"),
+ Option("ms_async_reap_threshold", Option::TYPE_UINT, Option::LEVEL_DEV)
+ .set_default(5)
+ .set_min(1)
+ .set_description("number of deleted connections before we reap"),
+
Option("ms_async_rdma_device_name", Option::TYPE_STR, Option::LEVEL_ADVANCED)
.set_default("")
.set_description(""),
entity_addrvec_t _filter_addrs(const entity_addrvec_t& addrs);
private:
- static const uint64_t ReapDeadConnectionThreshold = 5;
-
NetworkStack *stack;
std::vector<Processor*> processors;
friend class Processor;
deleted_conns.emplace(std::move(conn));
conn->unregister();
- if (deleted_conns.size() >= ReapDeadConnectionThreshold) {
+ if (deleted_conns.size() >= cct->_conf.get_val<uint64_t>("ms_async_reap_threshold")) {
local_worker->center.dispatch_event_external(reap_handler);
}
}