mirror of
https://github.com/ceph/ceph
synced 2025-01-18 09:02:08 +00:00
OSD: conditionally retry on receiving pg-notify when Primary is Incomplete
If the pg info sent by the peer is identical to ours, or it is from a down OSD, we can simply ignore and no action shall be taken. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
parent
9650e5b62c
commit
2df1a265a2
@ -7763,16 +7763,12 @@ boost::statechart::result PG::RecoveryState::Incomplete::react(const AdvMap &adv
|
||||
boost::statechart::result PG::RecoveryState::Incomplete::react(const MNotifyRec& notevt) {
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
ldout(pg->cct, 7) << "handle_pg_notify from osd." << notevt.from << dendl;
|
||||
if (pg->peer_info.count(notevt.from) &&
|
||||
pg->peer_info[notevt.from].last_update == notevt.notify.info.last_update) {
|
||||
ldout(pg->cct, 10) << *pg << " got dup osd." << notevt.from << " info " << notevt.notify.info
|
||||
<< ", identical to ours" << dendl;
|
||||
return discard_event();
|
||||
} else {
|
||||
pg->proc_replica_info(
|
||||
notevt.from, notevt.notify.info, notevt.notify.epoch_sent);
|
||||
// try again!
|
||||
if (pg->proc_replica_info(
|
||||
notevt.from, notevt.notify.info, notevt.notify.epoch_sent)) {
|
||||
// We got something new, try again!
|
||||
return transit< GetLog >();
|
||||
} else {
|
||||
return discard_event();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user