]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/ReplicatedPG: do not hit_set_persist while potentially backfilling hit_set_* 1603/head
authorSage Weil <sage@inktank.com>
Fri, 4 Apr 2014 20:56:33 +0000 (13:56 -0700)
committerSage Weil <sage@inktank.com>
Fri, 4 Apr 2014 20:56:33 +0000 (13:56 -0700)
commite02b7f93ab1a2035ccfb6e954a1ab3337c6810fd
treedbf8bd9784704a7c68a0d5e0102d7e06c462bb6d
parent4aef403dbc2ba3dd572d13c43b5192f04941dc07
osd/ReplicatedPG: do not hit_set_persist while potentially backfilling hit_set_*

The hit_set transactions may include both a modify of the new hit_set and
deletion of an old one, spanning the backfill boundary, and we may end up
sending a backfill target a blank transaction that does not correctly
remove the old object.  Later it will notice the stray object and
throw an assertion.

Fix this by skipping hit_set_persist() if any of the backfill targets are
still working on the very first hash value in the PG (which is where all
of the hit_set objects live).  This is coarse but simple.

Another solution would be to send separate ops for the trim/deletion and
new hit_set update, but that is a bit more complex and a bit more
runtime overhead (twice the messages).

Fixes: #7983
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc