]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd/PG: fix lost unfound + delete when there are no missing objects
authorJosh Durgin <jdurgin@redhat.com>
Fri, 4 Aug 2017 00:45:26 +0000 (20:45 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 4 Aug 2017 03:02:43 +0000 (23:02 -0400)
commitb9439b59b42f1d32573da461a557ad41a37ce799
treece443ddfe28e6096c9242bcd80ef4af66f6bd419
parentb8627f897ae11d8ba6d39ea5f1702d9abb5251dc
osd/PG: fix lost unfound + delete when there are no missing objects

The default constructed pg_missing_t for a peer with no missing
objects resets may_include_deletes to false, so when missing items for
lost deletes should be added later, they are not, and the old
version of the lost object is left on the replica.

Fix this by always setting may_include_deletes upon entering the
GetMissing state, and using clear() rather than the default
constructor to create an empty missing set.

This only affects lost_unfound delete since it is the only way for a
peer to gain missing delete entries. If the peer starts out missing
some objects, its missing set sent over the wire is used instead, with
the correct setting for may_include_deletes.

Fixes: http://tracker.ceph.com/issues/20904
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
src/osd/PG.cc