rgw_obj_index_key prev_marker;
for (uint16_t attempt = 1; /* empty */; ++attempt) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": starting attempt " << attempt << dendl;
if (attempt > 1 && !(prev_marker < cur_marker)) {
// we've failed to make forward progress
- ldpp_dout(dpp, 0) << "ERROR: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
" marker failed to make forward progress; attempt=" << attempt <<
", prev_marker=" << prev_marker <<
", cur_marker=" << cur_marker << dendl;
rgw_obj_index_key index_key = entry.key;
rgw_obj_key obj(index_key);
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": considering entry " << entry.key << dendl;
/* note that parse_raw_oid() here will not set the correct
*/
bool valid = rgw_obj_key::parse_raw_oid(index_key.name, &obj);
if (!valid) {
- ldpp_dout(dpp, 0) << "ERROR: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
" could not parse object name: " << obj.name << dendl;
continue;
}
bool matched_ns = (obj.ns == params.ns);
if (!params.list_versions && !entry.is_visible()) {
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": skipping not visible entry \"" << entry.key << "\"" << dendl;
continue;
}
if (!params.ns.empty()) {
/* we've iterated past the namespace we're searching -- done now */
truncated = false;
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": finished due to getting past requested namespace \"" <<
params.ns << "\"" << dendl;
goto done;
}
/* we're skipping past namespaced objects */
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skipping past namespaced objects, including \"" << entry.key <<
"\"" << dendl;
continue;
if (cur_end_marker_valid && cur_end_marker <= index_key) {
truncated = false;
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": finished due to gitting end marker of \"" << cur_end_marker <<
"\" with \"" << entry.key << "\"" << dendl;
goto done;
if (params.access_list_filter &&
! params.access_list_filter->filter(obj.name, index_key.name)) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skipping past namespaced objects, including \"" << entry.key <<
"\"" << dendl;
continue;
if (params.prefix.size() &&
0 != obj.name.compare(0, params.prefix.size(), params.prefix)) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skipping object \"" << entry.key <<
"\" that doesn't match prefix \"" << params.prefix << "\"" << dendl;
continue;
// prefix
if (delim_pos !=
int(obj.name.length() - params.delim.length())) {
- ldpp_dout(dpp, 0) << "WARNING: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "WARNING: " << __func__ <<
" found delimiter in place other than the end of "
"the prefix; obj.name=" << obj.name <<
", prefix=" << params.prefix << dendl;
if (common_prefixes) {
if (count >= max) {
truncated = true;
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": stopping early with common prefix \"" << entry.key <<
"\" because requested number (" << max <<
") reached (cls filtered)" << dendl;
count++;
}
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": finished entry with common prefix \"" << entry.key <<
"\" so continuing loop (cls filtered)" << dendl;
continue;
common_prefixes->find(prefix_key) == common_prefixes->end()) {
if (count >= max) {
truncated = true;
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": stopping early with common prefix \"" << entry.key <<
"\" because requested number (" << max <<
") reached (not cls filtered)" << dendl;
count++;
}
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": finished entry with common prefix \"" << entry.key <<
"\" so continuing loop (not cls filtered)" << dendl;
continue;
if (count >= max) {
truncated = true;
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": stopping early with entry \"" << entry.key <<
"\" because requested number (" << max <<
") reached" << dendl;
goto done;
}
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": adding entry " << entry.key << " to result" << dendl;
result->emplace_back(std::move(entry));
cur_marker.name.substr(0, marker_delim_pos);
skip_after_delim.append(after_delim_s);
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skip_after_delim=" << skip_after_delim << dendl;
if (skip_after_delim > cur_marker.name) {
cur_marker = skip_after_delim;
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": setting cur_marker=" << cur_marker.name <<
"[" << cur_marker.instance << "]" << dendl;
}
}
} // if older osd didn't do delimiter filtering
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": end of outer loop, truncated=" << truncated <<
", count=" << count << ", attempt=" << attempt << dendl;
// if we finished listing, or if we're returning at least half the
// requested entries, that's enough; S3 and swift protocols allow
// returning fewer than max entries
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": exiting attempt loop because we reached end (" << truncated <<
") or we're returning half the requested entries (" << count <<
" of " << max << ")" << dendl;
} else if (attempt > SOFT_MAX_ATTEMPTS && count >= 1) {
// if we've made at least 8 attempts and we have some, but very
// few, results, return with what we have
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": exiting attempt loop because we made " << attempt <<
" attempts and we're returning " << count << " entries" << dendl;
break;
&cur_marker,
y);
if (r < 0) {
- ldpp_dout(dpp, 0) << "ERROR: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
" cls_bucket_list_unordered returned " << r << " for " <<
target->get_bucket_info().bucket << dendl;
return r;
*/
bool valid = rgw_obj_key::parse_raw_oid(index_key.name, &obj);
if (!valid) {
- ldpp_dout(dpp, 0) << "ERROR: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ <<
" could not parse object name: " << obj.name << dendl;
continue;
}
if (!params.list_versions && !entry.is_visible()) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skippping \"" << index_key <<
"\" because not listing versions and entry not visibile" << dendl;
continue;
}
if (params.enforce_ns && obj.ns != params.ns) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skippping \"" << index_key <<
"\" because namespace does not match" << dendl;
continue;
if (cur_end_marker_valid && cur_end_marker <= index_key) {
// we're not guaranteed items will come in order, so we have
// to loop through all
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skippping \"" << index_key <<
"\" because after end_marker" << dendl;
continue;
if (params.access_list_filter &&
!params.access_list_filter->filter(obj.name, index_key.name)) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skippping \"" << index_key <<
"\" because doesn't match filter" << dendl;
continue;
if (params.prefix.size() &&
(0 != obj.name.compare(0, params.prefix.size(), params.prefix))) {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": skippping \"" << index_key <<
"\" because doesn't match prefix" << dendl;
continue;
&index_pool, &shard_oids,
nullptr);
if (r < 0) {
- ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": open_bucket_index for " << bucket_info.bucket << " failed" << dendl;
return r;
}
num_entries_per_shard = num_entries;
}
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": request from each of " << shard_count <<
" shard(s) for " << num_entries_per_shard << " entries to get " <<
num_entries << " total entries" << dendl;
list_versions, shard_oids, shard_list_results,
cct->_conf->rgw_bucket_index_max_aio)();
if (r < 0) {
- ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": CLSRGWIssueBucketList for " << bucket_info.bucket <<
" failed" << dendl;
return r;
const std::string& name = tracker.entry_name();
rgw_bucket_dir_entry& dirent = tracker.dir_entry();
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ": currently processing " <<
+ ldpp_dout(dpp, 20) << __func__ << ": currently processing " <<
dirent.key << " from shard " << tracker.shard_idx << dendl;
const bool force_check =
r = check_disk_state(dpp, sub_ctx, bucket_info, dirent, dirent,
updates[tracker.oid_name], y);
if (r < 0 && r != -ENOENT) {
- ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": check_disk_state for \"" << dirent.key <<
"\" failed with r=" << r << dendl;
return r;
// at this point either r >= 0 or r == -ENOENT
if (r >= 0) { // i.e., if r != -ENOENT
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ << ": got " <<
+ ldpp_dout(dpp, 10) << __func__ << ": got " <<
dirent.key << dendl;
auto [it, inserted] = m.insert_or_assign(name, std::move(dirent));
if (inserted) {
++count;
} else {
- ldpp_dout(dpp, 0) << "WARNING: " << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << "WARNING: " << __func__ <<
" reassigned map value at \"" << name <<
"\", which should not happen" << dendl;
}
} else {
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ << ": skipping " <<
+ ldpp_dout(dpp, 10) << __func__ << ": skipping " <<
dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
last_entry_visited = &tracker.dir_entry();
}
// as we cannot be certain that one of the next entries needs to
// come from that shard; S3 and swift protocols allow returning
// fewer than what was requested
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": stopped accumulating results at count=" << count <<
", dirent=\"" << dirent.key <<
"\", because its shard is truncated and exhausted" << dendl;
}
}
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": returning, count=" << count << ", is_truncated=" << *is_truncated <<
dendl;
if (*is_truncated && count < num_entries) {
- ldpp_dout(dpp, 10) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
": requested " << num_entries << " entries but returning " <<
count << ", which is truncated" << dendl;
}
if (last_entry_visited != nullptr && last_entry) {
*last_entry = last_entry_visited->key;
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": returning, last_entry=" << *last_entry << dendl;
} else {
- ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
": returning, last_entry NOT SET" << dendl;
}
ldout_bitx(bitx, dpp, 10) << "EXITING " << __func__ << dendl_bitx;
return 0;
-}
+} // RGWRados::cls_bucket_list_ordered
// A helper function to retrieve the hash source from an incomplete
librados::IoCtx head_obj_ctx; // initialize to data pool so we can get pool id
int ret = get_obj_head_ioctx(dpp, bucket_info, obj->get_obj(), &head_obj_ctx);
if (ret < 0) {
- ldpp_dout(dpp, 0) << __PRETTY_FUNCTION__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" WARNING: unable to find head object data pool for \"" <<
obj << "\", not updating version pool/epoch" << dendl;
} else {