diff --git a/repair/row_level.cc b/repair/row_level.cc index 7745ebf50b..abc3a205c4 100644 --- a/repair/row_level.cc +++ b/repair/row_level.cc @@ -1342,16 +1342,18 @@ private: future> copy_rows_from_working_row_buf_within_set_diff(repair_hash_set set_diff) { - return do_with(std::list(), std::move(set_diff), - [this] (std::list& rows, repair_hash_set& set_diff) { - return do_for_each(_working_row_buf, [&set_diff, &rows] (const repair_row& r) { + std::list rows; + { + for (const repair_row& r : _working_row_buf) { if (set_diff.contains(r.hash())) { rows.push_back(r); } - }).then([&rows] { - return std::move(rows); - }); - }); + co_await coroutine::maybe_yield(); + } + { + co_return rows; + } + } } // Return rows in the _working_row_buf with hash within the given sef_diff