const ghobject_t& end,
uint64_t limit)
{
+ LOG_PREFIX(FLTreeOnodeManager::list_onodes);
+ DEBUGT("start {}, end {}, limit {}", trans, start, end, limit);
return tree.lower_bound(trans, start
).si_then([this, &trans, end, limit] (auto&& cursor) {
using crimson::os::seastore::onode::full_key_t;
return trans_intr::repeat(
[this, &trans, end, &to_list, ¤t_cursor, &ret] ()
-> eagain_ifuture<seastar::stop_iteration> {
+ LOG_PREFIX(FLTreeOnodeManager::list_onodes);
if (current_cursor.is_end()) {
+ DEBUGT("reached the onode tree end", trans);
std::get<1>(ret) = ghobject_t::get_max();
return seastar::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::yes);
} else if (current_cursor.get_ghobj() >= end) {
+ DEBUGT("reached the end {} > {}",
+ trans, current_cursor.get_ghobj(), end);
std::get<1>(ret) = end;
return seastar::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::yes);
}
if (to_list == 0) {
+ DEBUGT("reached the limit", trans);
std::get<1>(ret) = current_cursor.get_ghobj();
return seastar::make_ready_future<seastar::stop_iteration>(
seastar::stop_iteration::yes);
}
- std::get<0>(ret).emplace_back(current_cursor.get_ghobj());
+ auto ghobj = current_cursor.get_ghobj();
+ DEBUGT("found onode for {}", trans, ghobj);
+ std::get<0>(ret).emplace_back(std::move(ghobj));
return tree.get_next(trans, current_cursor
).si_then([&to_list, ¤t_cursor] (auto&& next_cursor) mutable {
// we intentionally hold the current_cursor during get_next() to
std::vector<ghobject_t>(),
ghobject_t::get_max()));
} else {
+ LOG_PREFIX(SeaStore::list_objects);
+ DEBUGT("start {}, end {}, limit {}, bits {}",
+ t, start, end, limit, *bits);
auto filter = SeaStore::get_objs_range(ch, *bits);
using list_iertr = OnodeManager::list_onodes_iertr;
using repeat_ret = list_iertr::future<seastar::stop_iteration>;
auto pstart = ite->first;
auto pend = ite->second;
ranges.pop_front();
+ LOG_PREFIX(SeaStore::list_objects);
+ DEBUGT("pstart {}, pend {}, limit {}", t, pstart, pend, limit);
return onode_manager->list_onodes(
t, pstart, pend, limit
).si_then([&limit, &ret, pend](auto &&_ret) mutable {
assert(limit >= next_objects.size());
limit -= next_objects.size();
assert(limit == 0 ||
- std::get<1>(_ret) == pend ||
- std::get<1>(_ret) == ghobject_t::get_max());
+ std::get<1>(ret) == pend ||
+ std::get<1>(ret) == ghobject_t::get_max());
return list_iertr::make_ready_future<
seastar::stop_iteration
>(seastar::stop_iteration::no);