]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: reset last_peering_interval on replica activate
authorSage Weil <sage@inktank.com>
Sun, 6 May 2012 21:18:22 +0000 (14:18 -0700)
committerSage Weil <sage@inktank.com>
Sun, 6 May 2012 21:18:22 +0000 (14:18 -0700)
commit17114f266a336b6edd7e98975d494fdd487eec20
treec8b13c7a80f15c344f2510239fe4a57205e237fd
parent8ec476e526c14d229d05887241a7dff02c751e90
osd: reset last_peering_interval on replica activate

There was a silent bug in the activate 'acks' that go from the replica back
to the primary.  Prior to 86aa07d7a91ac23074e76551c3a6db3a5736cffa, we
were passing same_interval_since to the callback, which mean that
sometimes _activate_committed() would ignore it and we wouldn't update
last_epoch_started.  This was mosty invisible; the next peering event would
just, in some cases, look at more past intervals than it needed to.

In 86aa07d7a91ac23074e76551c3a6db3a5736cffa we fixed this so that the check
is correct.  (We noticed because now we aren't setting the pg CLEAN flag
until after last_epoch_started is updated.)  That, in turn, revealed a
similar bug that we're fixing here: the replica's last_peering_reset could
be lower than the primary's, such that the activate 'ack' info is ignored.

To fix this, simply set last_peering_reset to the current epoch when the
replica activates; this will always be greater than the primary's.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc