mirror of
https://github.com/ceph/ceph
synced 2025-01-11 21:50:26 +00:00
ReplicatedPG, tmap: return -ENOENT if the key to remove does not exist
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This commit is contained in:
parent
74f07fbd56
commit
0cea48a64f
@ -1986,8 +1986,9 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
|
||||
if (!ip.end()) {
|
||||
::decode(nextkey, ip);
|
||||
::decode(nextval, ip);
|
||||
} else
|
||||
} else {
|
||||
have_next = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (op == CEPH_OSD_TMAP_SET) {
|
||||
@ -2007,6 +2008,9 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
|
||||
dout(20) << " create " << key << " " << val.length() << dendl;
|
||||
nkeys++;
|
||||
} else if (op == CEPH_OSD_TMAP_RM) {
|
||||
if (!key_exists) {
|
||||
return -ENOENT;
|
||||
}
|
||||
// do nothing.
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user