using do_reclaim_space_ret = do_reclaim_space_ertr::future<>;
do_reclaim_space_ret do_reclaim_space(
const std::vector<CachedExtentRef> &backref_extents,
- const backref_mapping_list_t &pin_list,
+ backref_mapping_list_t &pin_list,
std::size_t &reclaimed,
std::size_t &runs,
ExtentCallbackInterface &extent_callback,
backref_manager.get_cached_backref_entries_in_range(start_pos, end_pos);
backref_entry_query_set_t backref_entries;
for (auto &pin : pin_list) {
+ pin.renew_cursor(t);
backref_entries.emplace(
pin.get_key(),
pin.get_val(),
assert(!is_end());
return iter.get_val().type;
}
+
+ BackrefCursor* renew_cursor(Transaction &t) {
+ auto c = op_context_t{ctx.cache, t};
+ t.maybe_add_to_read_set(parent);
+ return new BackrefCursor(
+ c,
+ std::move(parent),
+ modifications,
+ std::move(iter));
+ }
+
};
using BackrefCursorRef = boost::intrusive_ptr<BackrefCursor>;
assert(cursor);
return cursor->get_type();
}
+
+ void renew_cursor(Transaction &t) {
+ cursor.reset(cursor->renew_cursor(t));
+ }
};
using backref_mapping_list_t = std::list<BackrefMapping>;