Once we set osd_client_message_size_cap to non-zero, it cannot be set
back to zero unless we set conf file to 0 and restart the osd.
If we don't want to limit messages by throttle anymore, we have to set
a great number as upper bound. So allow it change to 0.
Signed-off-by: haoyixing <haoyixing@kuaishou.com>
if (changed.count("osd_client_message_cap")) {
uint64_t newval = cct->_conf->osd_client_message_cap;
Messenger::Policy pol = client_messenger->get_policy(entity_name_t::TYPE_CLIENT);
- if (pol.throttler_messages && newval > 0) {
+ if (pol.throttler_messages) {
pol.throttler_messages->reset_max(newval);
}
}
if (changed.count("osd_client_message_size_cap")) {
uint64_t newval = cct->_conf->osd_client_message_size_cap;
Messenger::Policy pol = client_messenger->get_policy(entity_name_t::TYPE_CLIENT);
- if (pol.throttler_bytes && newval > 0) {
+ if (pol.throttler_bytes) {
pol.throttler_bytes->reset_max(newval);
}
}