Project

General

Profile

Bug #41297

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 about 1 month ago. Updated 15 days ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
Start date:
08/15/2019
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
nautilus,mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:

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

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 listed In Progress
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 listed In Progress
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 listed In Progress

History

#1 Updated by Mark Kogan about 1 month ago

  • Description updated (diff)

#2 Updated by Mark Kogan about 1 month ago

  • Pull request ID set to 29692

#3 Updated by Casey Bodley about 1 month ago

  • Status changed from New to Need Review

#4 Updated by Eric Ivancich 15 days ago

  • Backport changed from yes to nautilus,mimic,luminous

#5 Updated by Eric Ivancich 15 days ago

  • Status changed from Need Review to Pending Backport

#6 Updated by Nathan Cutler 12 days 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

#7 Updated by Nathan Cutler 12 days 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

#8 Updated by Nathan Cutler 12 days 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

Also available in: Atom PDF