]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: timed out watcher is added to unconnected map
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 15 Dec 2010 23:37:32 +0000 (15:37 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Thu, 16 Dec 2010 00:33:42 +0000 (16:33 -0800)
src/osd/OSD.cc

index ca0366527b87baf76492c85e0b5eac6cdbc2daf6..a8b9f5ca3e5c4757cfe06b51ab818082dda917ae 100644 (file)
@@ -1753,8 +1753,13 @@ void OSD::handle_notify_timeout(void *_notif)
        notif_iter != notif->watchers.end();
        ++notif_iter) {
     map<entity_name_t, Session *>::iterator witer = obc->watchers.find(notif_iter->first);
-    if (witer != obc->watchers.end())
+    if (witer != obc->watchers.end()) {
+      watch_info_t& w = obc->obs.oi.watchers[notif_iter->first];
       obc->watchers.erase(witer);   // FIXME: hmm? notify timeout may be different than watch timeout?
+      utime_t expire = g_clock.now();
+      expire += w.timeout_seconds;
+      obc->unconnected_watchers[notif_iter->first] = expire;
+    }
   }
   obc->lock.Unlock();
   watch_lock.Unlock(); /* put_object_context takes osd->lock */