From 28d18726e14167dcf2bf4a34431fe5843938d73c Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Mon, 20 May 2024 08:31:14 +0800 Subject: [PATCH] Revert "mds: find a new head for the batch ops when the head is dead" This reverts commit 793ea12a2c7b03140331d40f028677f63cfc9de6. Fixes: https://tracker.ceph.com/issues/66124 Signed-off-by: Xiubo Li --- src/mds/MDCache.cc | 20 +------------------- src/mds/Server.cc | 9 ++------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index eea9de5a0589e..51bc013cb8a49 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9816,25 +9816,7 @@ void MDCache::request_forward(const MDRequestRef& mdr, mds_rank_t who, int port) void MDCache::dispatch_request(const MDRequestRef& mdr) { if (mdr->dead) { - dout(10) << __func__ << ": dead " << *mdr << dendl; - //if the mdr is a "batch_op" and it has followers, pick a follower as - //the new "head of the batch ops" and go on processing the new one. - if (mdr->client_request && mdr->is_batch_head()) { - int mask = mdr->client_request->head.args.getattr.mask; - auto it = mdr->batch_op_map->find(mask); - auto new_batch_head = it->second->find_new_head(); - if (!new_batch_head) { - mdr->batch_op_map->erase(it); - dout(10) << __func__ << ": mask '" << mask - << "' batch head is dead and there is no follower" << dendl; - return; - } - dout(10) << __func__ << ": mask '" << mask - << "' batch head is dead and queue a new one " - << *new_batch_head << dendl; - mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head)); - return; - } + dout(20) << __func__ << ": dead " << *mdr << dendl; return; } if (mdr->client_request) { diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 589abf9e8de7b..3dd2cc6156014 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2652,14 +2652,9 @@ void Server::dispatch_client_request(const MDRequestRef& mdr) auto it = mdr->batch_op_map->find(mask); auto new_batch_head = it->second->find_new_head(); if (!new_batch_head) { - mdr->batch_op_map->erase(it); - dout(10) << __func__ << ": mask '" << mask - << "' batch head is killed and there is no follower" << dendl; - return; + mdr->batch_op_map->erase(it); + return; } - dout(10) << __func__ << ": mask '" << mask - << "' batch head is killed and queue a new one " - << *new_batch_head << dendl; mds->finisher->queue(new C_MDS_RetryRequest(mdcache, new_batch_head)); return; } else { -- 2.39.5