]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Fix spurious error on empty datalog shard 40262/head
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 19 Jan 2021 19:47:27 +0000 (14:47 -0500)
committersinguliere <singuliere@autistici.org>
Fri, 19 Mar 2021 18:24:46 +0000 (19:24 +0100)
-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 <aemerson@redhat.com>
Fixes: https://tracker.ceph.com/issues/48929
(cherry picked from commit 8c5c7c7a9098fc688f63503b254065e5b3b4ae45)

src/rgw/cls_fifo_legacy.cc
src/rgw/rgw_datalog.cc

index daa7e8be5d37c183bb8ea6cb0ffba493f46b4ae5..d835aeec76ab8806ca7f078641dc5d6c229a5e56 100644 (file)
@@ -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;
 
index b1c377704f4ae4f2113c21c31c0a1514a976dca2..a875d075ecade3aa1b85c2aba1b49697b1a4e893 100644 (file)
@@ -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]