Project

General

Profile

Actions

Bug #41297

closed

in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listed

Added by Mark Kogan over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
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)


Related issues 3 (0 open3 closed)

Copied to rgw - Backport #41706: luminous: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listedResolvedNathan CutlerActions
Copied to rgw - Backport #41707: nautilus: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listedResolvedNathan CutlerActions
Copied to rgw - Backport #41708: mimic: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listedResolvedNathan CutlerActions
Actions #1

Updated by Mark Kogan over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Mark Kogan over 4 years ago

  • Pull request ID set to 29692
Actions #3

Updated by Casey Bodley over 4 years ago

  • Status changed from New to Fix Under Review
Actions #4

Updated by J. Eric Ivancich over 4 years ago

  • Backport changed from yes to nautilus,mimic,luminous
Actions #5

Updated by J. Eric Ivancich over 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41706: luminous: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listed added
Actions #7

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41707: nautilus: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listed added
Actions #8

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41708: mimic: in cls_bucket_list_unordered() listing of entries following an entry for which check_disk_state() returns -ENOENT may not get listed added
Actions #9

Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF