From: Oguzhan Ozmen Date: Wed, 20 May 2026 13:23:29 +0000 (+0000) Subject: rgw/datalog: also handle errors properly for fifo trim X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2679e30ecc15b3deb7825c9b98a600fbe2f46cf3;p=ceph.git rgw/datalog: also handle errors properly for fifo trim RGWDataChangesFIFO::trim: handle ENODATA from empty FIFO: fifo::FIFO::trim() throws ENODATA (no_message_available) when the FIFO has no parts yet. This manifests on clusters with rgw_default_data_log_backing=fifo when trim_entries is called on a shard before any entries have been pushed. Signed-off-by: Oguzhan Ozmen (cherry picked from commit 4c5f4df9e227caa2bf91ab31a9bf184f305a7993) --- diff --git a/src/rgw/driver/rados/rgw_datalog.cc b/src/rgw/driver/rados/rgw_datalog.cc index 8fe75e8a59a..dce254c3641 100644 --- a/src/rgw/driver/rados/rgw_datalog.cc +++ b/src/rgw/driver/rados/rgw_datalog.cc @@ -337,7 +337,15 @@ public: } asio::awaitable trim(const DoutPrefixProvider *dpp, int index, std::string_view marker) override { - co_await fifos[index].trim(dpp, std::string{marker}, false); + try { + co_await fifos[index].trim(dpp, std::string{marker}, false); + } catch (const sys::system_error& e) { + if (e.code() != sys::errc::no_message_available) { + ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ + << ": trim failed: " << e.what() << dendl; + throw; + } + } } std::string_view max_marker() const override { static const auto max_mark = fifo::FIFO::max_marker();