From: Adam C. Emerson Date: Tue, 19 Jan 2021 19:47:27 +0000 (-0500) Subject: rgw: Fix spurious error on empty datalog shard X-Git-Tag: v16.2.0~46^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=565efc038f59bf2c43549d50297ffcdcf2515a5a;p=ceph.git rgw: Fix spurious error on empty datalog shard -ENOENT on a shard simply means nothing has been written to it yet. Return no entries and no error. Also change dout_subsys target for fifo client so probes don't fill up the logs. Signed-off-by: Adam C. Emerson Fixes: https://tracker.ceph.com/issues/48929 (cherry picked from commit 8c5c7c7a9098fc688f63503b254065e5b3b4ae45) --- diff --git a/src/rgw/cls_fifo_legacy.cc b/src/rgw/cls_fifo_legacy.cc index daa7e8be5d37c..d835aeec76ab8 100644 --- a/src/rgw/cls_fifo_legacy.cc +++ b/src/rgw/cls_fifo_legacy.cc @@ -39,7 +39,7 @@ #include "cls_fifo_legacy.h" namespace rgw::cls::fifo { -static constexpr auto dout_subsys = ceph_subsys_rgw; +static constexpr auto dout_subsys = ceph_subsys_objclass; namespace cb = ceph::buffer; namespace fifo = rados::cls::fifo; diff --git a/src/rgw/rgw_datalog.cc b/src/rgw/rgw_datalog.cc index b1c377704f4ae..a875d075ecade 100644 --- a/src/rgw/rgw_datalog.cc +++ b/src/rgw/rgw_datalog.cc @@ -192,6 +192,10 @@ public: max_entries, log_entries, std::string(marker.value_or("")), out_marker, truncated, null_yield); + if (r == -ENOENT) { + *truncated = false; + return 0; + } if (r < 0) { lderr(cct) << __PRETTY_FUNCTION__ << ": failed to list " << oids[index]