Actions
Bug #41297
closedin cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listed
% Done:
0%
Source:
Development
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Following an
/bin/radosgw-admin bucket rm --bucket=<BUCKET> --bypass-gc --purge-objects
operation is aborted by <ctrl>-c (or OOM)
in src/rgw/rgw_rados.cc : cls_bucket_list_unordered()
cls_rgw_bucket_list_op(op, marker, prefix, num_entries,
list_versions, &result);
r = index_ctx.operate(oid, &op, nullptr);
if (r < 0)
return r;
for (auto &entry : result.dir.m)
{
rgw_bucket_dir_entry &dirent = entry.second;
bool force_check = force_check_filter &&
force_check_filter(dirent.key.name);
if ((!dirent.exists && !dirent.is_delete_marker()) ||
!dirent.pending_map.empty() ||
force_check)
{
/* there are uncommitted ops. We need to check the current state,
* and if the tags are old we need to do cleanup as well. */
librados::IoCtx sub_ctx;
sub_ctx.dup(index_ctx);
r = check_disk_state(sub_ctx, bucket_info, dirent, dirent, updates[oid], null_yield);
if (r < 0 && r != -ENOENT)
{
return r;
}
}
// at this point either r >=0 or r == -ENOENT
if (r >= 0)
{ // i.e., if r != -ENOENT
ldout(cct, 10) << "RGWRados::cls_bucket_list_unordered: got " << dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
...
}
once an object sets "r" to -ENOENT in
r = check_disk_state(sub_ctx, bucket_info, dirent, dirent, updates[oid], null_yield);
if (r < 0 && r != -ENOENT) {
the objects in the current results batch will not be processed until the
next batch of objects is received from the next call cls_rgw_bucket_list_op()
(the value of "r" is not reset back to 0 for the following entries in the results batch)
Actions