// open guard on object so we don't any previous operations on the
// new name that will modify the source inode.
int fd = lfn_open(oldcid, o, 0);
+ if (fd < 0) {
+ // the source collection/object does not exist. If we are replaying, we
+ // should be safe, so just return 0 and move on.
+ assert(replaying);
+ dout(10) << "collection_add " << c << "/" << o << " from "
+ << oldcid << "/" << o << " (dne, continue replay) " << dendl;
+ return 0;
+ }
assert(fd >= 0);
if (dstcmp > 0) { // if dstcmp == 0 the guard already says "in-progress"
_set_replay_guard(fd, spos, true);