From 9d7a80b5901351fe769df974f336714e62712d7b Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Tue, 16 May 2023 11:30:15 -0400 Subject: [PATCH] rgw: multisite data logging flag controls data logging Signed-off-by: J. Eric Ivancich (cherry picked from commit 33ce64ca64f468883e3fec9530d243fb51074b5c) Conflicts: src/rgw/rgw_rados.cc (add_entry is synchronous in pacific) --- src/rgw/rgw_rados.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 4b2e02de0429e..c6999d9014e1b 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -6930,9 +6930,11 @@ int RGWRados::bucket_index_link_olh(const DoutPrefixProvider *dpp, const RGWBuck return r; } - r = svc.datalog_rados->add_entry(dpp, bucket_info, bs.shard_id); - if (r < 0) { - ldpp_dout(dpp, 0) << "ERROR: failed writing data log" << dendl; + if (log_data_change) { + r = svc.datalog_rados->add_entry(dpp, bucket_info, bs.shard_id); + if (r < 0) { + ldpp_dout(dpp, 0) << "ERROR: failed writing data log" << dendl; + } } return 0; -- 2.39.5