From: Samuel Just Date: Mon, 4 Nov 2013 19:25:31 +0000 (-0800) Subject: FileStore::_collection_move_rename: handle missing dst dir on replay X-Git-Tag: v0.72~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=154ee0b0345482bdfdeb84b7d3b00dba71577d97;p=ceph.git FileStore::_collection_move_rename: handle missing dst dir on replay In case of a replay, a missing destination directory indicates that the destination object and directory have been removed by a later transaction. Thus, we need to remove the src object and return 0. Fixes: #6714 Signed-off-by: Samuel Just Reviewed-by: Greg Farnum --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index ffac501aaf2..89a55b393db 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -4273,6 +4273,14 @@ int FileStore::_collection_move_rename(coll_t oldcid, const ghobject_t& oldoid, int r = 0; int dstcmp, srccmp; + if (replaying) { + /* If the destination collection doesn't exist during replay, + * we need to delete the src object and continue on + */ + if (!collection_exists(c)) + goto out_rm_src; + } + dstcmp = _check_replay_guard(c, o, spos); if (dstcmp < 0) goto out_rm_src;