]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PG: fix _finish_recovery vs repair race 30059/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Sat, 31 Aug 2019 02:17:57 +0000 (10:17 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 2 Sep 2019 00:44:20 +0000 (08:44 +0800)
commitd96e53285b4e748eacda314bf0958b87cfa42130
treecaf49c3a766e132508f689355522f7fd753ca950
parent4c190643d34e81b65883754e5d2ff26313ed39e9
osd/PG: fix _finish_recovery vs repair race

On detecting a corrupted object, primary may automatically
repair that object by leveraging the existing recovery procedure,
which turned out to be racy with a previous unfinished _finish_recovery
callback - the problem would then be that _finish_recovery might
continue to purge some strays that we still want to pull data from.

Fix by re-checking if there are any newly added missing objects when
executing _finish_recovery.

Note that before https://github.com/ceph/ceph/pull/29756 we might
instead have to call needs_recovery to catch the race condition
since we did not evict pg from clean state when triggering an auto-repair..

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.cc