]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cls/rgw: preserve olh entry's name on last unlink 36652/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 10 Jul 2020 16:38:06 +0000 (12:38 -0400)
committerNathan Cutler <ncutler@suse.com>
Sat, 15 Aug 2020 13:09:47 +0000 (15:09 +0200)
commit9de70d50e6e41caca558f63c2c996bfb21c634f1
treef25cbde3071403c24d5ea1abf183804e66396ae6
parent35adebe94e8b0a17e7b56379a8bf24e5f7b8ced4
cls/rgw: preserve olh entry's name on last unlink

When rgw_bucket_unlink_instance removes the last instance of a name, it
also clears the value of rgw_bucket_olh_entry.key. However, bucket index
resharding uses this key when choosing its shard placement, so an empty
key causes all of these olh entries to be misplaced in shard 0. After
reshard, all of the olh recovery/cleanup logic would be sent to the
correct shard, and these misplaced olh entries would never be cleaned
up.

Preserving the key's name on last unlink allows the olh entry to be
resharded correctly and cleaned up normally.

Fixes: https://tracker.ceph.com/issues/46456
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit acf8f3cad9f55e34c703fdaef684853a3fb3b369)
src/cls/rgw/cls_rgw.cc