]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix index update in dir_suggest_changes 22677/head
authorTianshan Qu <tianshan@xsky.com>
Thu, 24 May 2018 13:02:39 +0000 (21:02 +0800)
committerJ. Eric Ivancich <ivancich@redhat.com>
Mon, 25 Jun 2018 19:09:16 +0000 (15:09 -0400)
commit2e3f9de81959d4dc8becb17e3e11d5a69e927d04
treefd5c9b3cee1e9677763c3f7b22bc9d5b0dd84fd2
parentec1276b325adcf1eb2ec6428321b1a393d42d116
rgw: fix index update in dir_suggest_changes

1. do nothing if the index is no longer exists in cls
   rgw_dir_suggest_changes, whatever the pending state we got in
   check_disk_state, to avoid recreate index when list race with
   delete. the situations:

   * if dir_suggest_changes is done before complete op in Delete, the
     index will be deleted finally.

   * if dir_suggest_changes is done after complete op in Delete, the
     index will no exists and do nothing.

2. stale pending write op's index is existent but exists field is
   false, so remove cur_disk.exists check in op CEPH_RGW_UPDATE, make
   it recover the situation again.

fixes: http://tracker.ceph.com/issues/24627

jewel backport of: https://github.com/ceph/ceph/pull/22217

Signed-off-by: Tianshan Qu <tianshan@xsky.com>
(cherry picked from commit 8304c3e934d667fb89dbe0a79b252a5610b5eb62)
src/cls/rgw/cls_rgw.cc