]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: only ping after watch is registered
authorSage Weil <sage@redhat.com>
Fri, 12 Dec 2014 21:53:47 +0000 (13:53 -0800)
committerSage Weil <sage@redhat.com>
Fri, 12 Dec 2014 21:53:47 +0000 (13:53 -0800)
If we ping before the watch is registered we will get ETIMEDOUT (the ping
is are a read op that will fail to see the watch registration).

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index f53783fe613632a18eb9bdf8a697600454c1ae91..cf487abfecc334f62ea9b95cffaa8a0665211d31 100644 (file)
@@ -1848,7 +1848,7 @@ void Objecter::tick()
         assert(op->session);
         ldout(cct, 10) << " pinging osd that serves lingering tid " << p->first << " (osd." << op->session->osd << ")" << dendl;
         toping.insert(op->session);
-       if (op->is_watch && !op->last_error)
+       if (op->is_watch && op->registered && !op->last_error)
          _send_linger_ping(op);
       }
       for (map<uint64_t,CommandOp*>::iterator p = s->command_ops.begin();