File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed 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