From: Sam Lang Date: Mon, 25 Mar 2013 17:58:13 +0000 (-0500) Subject: client: Handle duplicate safe replies X-Git-Tag: v0.62~171^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3b520b5173d96db5ffc30ed31a92760f3910e733;p=ceph.git client: Handle duplicate safe replies If the mds sends a duplicate safe reply, the mds_requests map won't contain a matching request id (tid). Instead of assert failing, we log a message that we saw a reply without a matching request. Also remove redundant mds_requests->erase(tid) line. Signed-off-by: Sam Lang --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 6c90844c1846..59f32ef3b746 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1698,7 +1698,12 @@ void Client::handle_client_reply(MClientReply *reply) ldout(cct, 20) << "handle_client_reply got a reply. Safe:" << is_safe << " tid " << tid << dendl; MetaRequest *request = mds_requests[tid]; - assert(request); + if (!request) { + ldout(cct, 0) << "got an unknown reply (probably duplicate) on tid " << tid << " from mds " + << mds_num << " safe: " << is_safe << dendl; + reply->put(); + return; + } if (request->got_unsafe && !is_safe) { //duplicate response @@ -1756,7 +1761,6 @@ void Client::handle_client_reply(MClientReply *reply) request->unsafe_item.remove_myself(); } request->item.remove_myself(); - mds_requests.erase(tid); request->put(); // for the dumb data structure } if (unmounting)