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-Tag: v21.0.1~141^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c5f4df9e227caa2bf91ab31a9bf184f305a7993;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 --- diff --git a/src/rgw/driver/rados/rgw_datalog.cc b/src/rgw/driver/rados/rgw_datalog.cc index 4b85826767a3..74a0675caf14 100644 --- a/src/rgw/driver/rados/rgw_datalog.cc +++ b/src/rgw/driver/rados/rgw_datalog.cc @@ -346,7 +346,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();