]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: add an "object reindex" subcommand to radosgw-admin
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 2 Mar 2023 04:41:12 +0000 (23:41 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Mon, 13 Mar 2023 20:15:45 +0000 (16:15 -0400)
commitee0a8eac2f883e6db82412004448909527e6d84c
tree43fddea1f714278059b9f04dfc8c87cb92083335
parent7cea37403f202c61e567b2359883c5dab08f6918
rgw: add an "object reindex" subcommand to radosgw-admin

This subcommand will take a bucket and an object (or a list of objects
in a file) and add those objects to the bucket's index. It does so by
preparing the bucket index entry update and then allowing the
so-called "dir suggest" mechansim, which is triggered by listing the
bucket, to completing the bucket index entry. This mechanism is
triggered by listing the bucket.  Using this mechanism has the
advantage of doing this lazily that both allows the reindex operation
to run more quickly and distributes the workload over time.

This subcommand can help restore lost bucket index entries.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit be0583c3082b9f924fcdbe4c81d540ad08bcca24)
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/rgw_admin.cc
src/test/cli/radosgw-admin/help.t