File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -1734,8 +1734,10 @@ class FIFO {
17341734 sys::error_code{});
17351735 co_return sys::error_code{};
17361736 } catch (const sys::system_error& e) {
1737- ldpp_dout (dpp, -1 ) << __PRETTY_FUNCTION__ << " :" << __LINE__
1738- << " trim failed: " << e.what () << dendl;
1737+ if (ceph::from_error_code (e.code ()) != -ENODATA) {
1738+ ldpp_dout (dpp, -1 ) << __PRETTY_FUNCTION__ << " :" << __LINE__
1739+ << " trim failed: " << e.what () << dendl;
1740+ }
17391741 co_return e.code ();
17401742 }
17411743 }, rados.get_executor ()),
Original file line number Diff line number Diff line change @@ -1260,26 +1260,23 @@ asio::awaitable<void> DataLogBackends::trim_entries(
12601260{
12611261 auto [target_gen, cursor] = cursorgen (std::string{marker});
12621262 std::unique_lock l (m);
1263+
12631264 const auto head_gen = (end () - 1 )->second ->gen_id ;
12641265 const auto tail_gen = begin ()->first ;
1265- if (target_gen < tail_gen)
1266-
1266+ if (target_gen < tail_gen)
12671267 co_return ;
1268- auto r = 0 ;
1268+
12691269 for (auto be = lower_bound (0 )->second ;
1270- be->gen_id <= target_gen && be->gen_id <= head_gen && r >= 0 ;
1270+ be->gen_id <= target_gen && be->gen_id <= head_gen;
12711271 be = upper_bound (be->gen_id )->second ) {
12721272 l.unlock ();
12731273 auto c = be->gen_id == target_gen ? cursor : be->max_marker ();
12741274 co_await be->trim (dpp, shard_id, c);
1275- if (r == -ENOENT)
1276- r = -ENODATA;
1277- if (r == -ENODATA && be->gen_id < target_gen)
1278- r = 0 ;
12791275 if (be->gen_id == target_gen)
12801276 break ;
12811277 l.lock ();
12821278 };
1279+
12831280 co_return ;
12841281}
12851282
You can’t perform that action at this time.
0 commit comments