From: Sage Weil Date: Mon, 17 Nov 2014 15:32:12 +0000 (-0800) Subject: osdc/Objecter: only reconnect watches; skip ack unless needed X-Git-Tag: v0.91~93 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=45aaa340a9ab27425daac34807233f87bb7c5700;p=ceph.git osdc/Objecter: only reconnect watches; skip ack unless needed Only watches get a RECONNECT op; lingers just get resent. Only request an ACK in the non-watch reconnect case and when an ack callback is specified. Signed-off-by: Sage Weil --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 2b7fc9962b67..a60e2b8a680d 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -418,19 +418,21 @@ void Objecter::_send_linger(LingerOp *info) vector opv; Context *onack = NULL; - if (info->registered) { + Context *oncommit = NULL; + if (info->registered && info->is_watch) { ldout(cct, 15) << "send_linger " << info->linger_id << " reconnect" << dendl; - onack = new C_Linger_Reconnect(this, info); opv.push_back(OSDOp()); opv.back().op.op = CEPH_OSD_OP_WATCH; opv.back().op.watch.cookie = info->linger_id; opv.back().op.watch.op = CEPH_OSD_WATCH_OP_RECONNECT; + oncommit = new C_Linger_Reconnect(this, info); } else { ldout(cct, 15) << "send_linger " << info->linger_id << " register" << dendl; - onack = new C_Linger_Register(this, info); opv = info->ops; + if (info->on_reg_ack) + onack = new C_Linger_Register(this, info); + oncommit = new C_Linger_Commit(this, info); } - Context *oncommit = new C_Linger_Commit(this, info); Op *o = new Op(info->target.base_oid, info->target.base_oloc, opv, info->target.flags | CEPH_OSD_FLAG_READ, onack, oncommit,