]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: allow osd_client_message_size throttle set to zero 40518/head
authorhaoyixing <haoyixing@kuaishou.com>
Wed, 31 Mar 2021 06:23:14 +0000 (06:23 +0000)
committerhaoyixing <haoyixing@kuaishou.com>
Wed, 31 Mar 2021 06:23:20 +0000 (06:23 +0000)
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>
src/osd/OSD.cc

index 99e9a863e44cf9df8ccc09449bbf314244a03f2d..28ea895d251048618f2b065d6dcbc3eaf019b639 100644 (file)
@@ -10048,14 +10048,14 @@ void OSD::handle_conf_change(const ConfigProxy& conf,
   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);
     }
   }