]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: return error codes for dups from the pg log
authorJosh Durgin <jdurgin@redhat.com>
Wed, 11 May 2016 00:34:24 +0000 (17:34 -0700)
committerJosh Durgin <jdurgin@redhat.com>
Sat, 9 Jul 2016 01:33:13 +0000 (18:33 -0700)
commit4c709e9b6d4c54adbc7581128c12dd7c73c38da9
tree853ca906d7172578a1e49644f86576dbd7c0ea24
parented33ffcbd3751284926ad485e61c90b65aceb00f
ReplicatedPG: return error codes for dups from the pg log

This prevents reordering guarded writes or deletes.

Without this, the following sequence:

delete foo -> -ENOENT
write foo -> success
(client connection fails)
resend delete foo -> success, object deleted
resend write foo -> success - dup op, so no write performed

results in the object not existing, instead of containing data. After
this change, both delete and write are detected as dups and the
original ordering is preserved.

Fixes: http://tracker.ceph.com/issues/14468
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/osd/PGLog.h
src/osd/ReplicatedPG.cc