This avoids a ceph crash like
mon/PGMap.h: In function 'void PGMap::apply_incremental(PGMap::Incremental&)':
mon/PGMap.h:77: FAILED assert(inc.version == version+1)
1: (PGMap::apply_incremental(PGMap::Incremental&)+0x50) [0x5a5f22]
2: (handle_notify(MMonObserveNotify*)+0x2c7) [0x567c53]
3: (Admin::ms_dispatch(Message*)+0x52) [0x5aa042]
4: (Messenger::ms_deliver_dispatch(Message*)+0x55) [0x5be389]
5: (SimpleMessenger::dispatch_entry()+0x50f) [0x5ad3fb]
6: (SimpleMessenger::DispatchThread::entry()+0x29) [0x597323]
7: (Thread::_entry_func(void*)+0x20) [0x5b91c8]
8: /lib/libpthread.so.0 [0x7f31185fd73a]
9: (clone()+0x6d) [0x7f311782769d]
Signed-off-by: Sage Weil <sage@newdream.net>
}
++iter;
- if (observer->last_version == 0) {
+ if (observer->last_version == 0 ||
+ observer->last_version < first_committed) {
ver = get_latest(bl);
if (ver) {
dout(10) << " sending summary state v" << ver << " to " << observer->inst << dendl;