]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
paxos: send summary if observer has fallen behind first_committed
authorSage Weil <sage@newdream.net>
Mon, 5 Jul 2010 17:27:11 +0000 (10:27 -0700)
committerSage Weil <sage@newdream.net>
Tue, 6 Jul 2010 22:00:19 +0000 (15:00 -0700)
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>
src/mon/Paxos.cc

index ddeb348d442fd5e7789b63a5e05b4a23c94842ec..b3515fac18067fd680034e5b511ba3dcc92334a5 100644 (file)
@@ -883,7 +883,8 @@ void Paxos::update_observers()
     }
     ++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;