]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/multisite: disable mdlog async notifications to prevent excessive polling wip-mdlog-disable-async-notification 52357/head
authorShilpa Jagannath <smanjara@redhat.com>
Fri, 7 Jul 2023 15:10:12 +0000 (11:10 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Fri, 7 Jul 2023 15:14:35 +0000 (11:14 -0400)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
src/common/options/rgw.yaml.in
src/rgw/driver/rados/rgw_metadata.cc
src/rgw/driver/rados/rgw_rados.cc

index 74e158806121a9ba10a05c8ffb3de9ed3b2fd0c7..84455ed3d038e68082113def72826710a8b14059 100644 (file)
@@ -2412,7 +2412,7 @@ options:
   long_desc: Length of time (in milliseconds) in which the master zone aggregates
     all the metadata changes that occurred, before sending notifications to all the
     other zones.
-  default: 200
+  default: 0
   services:
   - rgw
   with_legacy: true
index e3e49316eac5ea109b830a3812f39164f4e3a947..761ac6c66f74e1b5ae272e8b5897452fccfe6c2d 100644 (file)
@@ -198,6 +198,10 @@ int RGWMetadataLog::unlock(const DoutPrefixProvider *dpp, int shard_id, string&
 
 void RGWMetadataLog::mark_modified(int shard_id)
 {
+  if (!cct->_conf->rgw_md_notify_interval_msec) {
+    return;
+  }
+
   lock.get_read();
   if (modified_shards.find(shard_id) != modified_shards.end()) {
     lock.unlock();
index 2a213cafc6e03ff6b685a2409811ffb89121d649..256a8cc3335222b9eb131f0278d29e8185fc4c28 100644 (file)
@@ -1208,9 +1208,11 @@ int RGWRados::init_complete(const DoutPrefixProvider *dpp, optional_yield y)
   }
 
   if (svc.zone->is_meta_master()) {
-    auto md_log = svc.mdlog->get_log(current_period.get_id());
-    meta_notifier = new RGWMetaNotifier(this, md_log);
-    meta_notifier->start();
+    if (cct->_conf->rgw_md_notify_interval_msec) {
+      auto md_log = svc.mdlog->get_log(current_period.get_id());
+      meta_notifier = new RGWMetaNotifier(this, md_log);
+      meta_notifier->start();
+    }
   }
 
   /* init it anyway, might run sync through radosgw-admin explicitly */