]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: allow rgw_data_notify_interval_msec=0 to disable notifications
authorCasey Bodley <cbodley@redhat.com>
Wed, 10 Mar 2021 21:12:13 +0000 (16:12 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 17 Jan 2022 18:54:36 +0000 (13:54 -0500)
the data changes log for multisite will occasionally broadcast recent
changes to other zones, which they can use to prioritize sync of some
of the most recent changes. they'll eventually see all changes as they
replay the data changes log, though, so notifications aren't required
for successful sync. the ability to turn them off is useful for testing

Fixes: https://tracker.ceph.com/issues/49723
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/options/rgw.yaml.in
src/rgw/rgw_datalog.cc
src/rgw/rgw_rados.cc

index 079609acb591f935ca6452fa4a2015aef39629d4..ac7f6ac1b6e60a22b591c67ef49fe6bbec33711a 100644 (file)
@@ -2801,9 +2801,13 @@ options:
   type: int
   level: advanced
   desc: data changes notification interval to followers
+  long_desc: In multisite, radosgw will occasionally broadcast new entries in its
+    data changes log to peer zones, so they can prioritize sync of some
+    of the most recent changes. Can be disabled with 0.
   default: 200
   services:
   - rgw
+  with_legacy: true
 - name: rgw_torrent_origin
   type: str
   level: advanced
@@ -2822,7 +2826,7 @@ options:
   type: bool
   level: basic
   desc: Enable dynamic resharding
-  long_desc: If true, RGW will dynamicall increase the number of shards in buckets
+  long_desc: If true, RGW will dynamically increase the number of shards in buckets
     that have a high number of objects per shard.
   default: true
   services:
index 24acd3624edab4ee67db31b3c08974e23840684c..c64969712ae2531019dfade313149d8a351e4b91 100644 (file)
@@ -990,6 +990,10 @@ void RGWDataChangesLog::renew_stop()
 
 void RGWDataChangesLog::mark_modified(int shard_id, const rgw_bucket_shard& bs)
 {
+  if (!cct->_conf->rgw_data_notify_interval_msec) {
+    return;
+  }
+
   auto key = bs.get_key();
   {
     std::shared_lock rl{modified_lock}; // read lock to check for existence
index e4fa7afcb112a0cd6637a297dc3e5c3fed0d33af..680da9f4fc433ef3d5eb66cef1b9fafccb5045d1 100644 (file)
@@ -1311,8 +1311,10 @@ int RGWRados::init_complete(const DoutPrefixProvider *dpp)
       sync_log_trimmer->start();
     }
   }
-  data_notifier = new RGWDataNotifier(this);
-  data_notifier->start();
+  if (cct->_conf->rgw_data_notify_interval_msec) {
+    data_notifier = new RGWDataNotifier(this);
+    data_notifier->start();
+  }
 
   binfo_cache = new RGWChainedCacheImpl<bucket_info_entry>;
   binfo_cache->init(svc.cache);