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 <sam.lang@inktank.com>
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
request->unsafe_item.remove_myself();
}
request->item.remove_myself();
- mds_requests.erase(tid);
request->put(); // for the dumb data structure
}
if (unmounting)