From: chencan Date: Wed, 2 Dec 2020 07:55:32 +0000 (+0800) Subject: mds: check rejoin_ack_gather before enter rejoin_gather_finish X-Git-Tag: v16.2.6~27^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42938%2Fhead;p=ceph.git mds: check rejoin_ack_gather before enter rejoin_gather_finish Fixes: https://tracker.ceph.com/issues/48422 Signed-off-by: chencan (cherry picked from commit 88548775330f66226b4e58a34256f1cc5a72221f) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index b368dff83ebe..e9cbf7141c4c 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5327,7 +5327,7 @@ void MDCache::rejoin_open_ino_finish(inodeno_t ino, int ret) cap_imports_num_opening--; if (cap_imports_num_opening == 0) { - if (rejoin_gather.empty()) + if (rejoin_gather.empty() && rejoin_ack_gather.count(mds->get_nodeid())) rejoin_gather_finish(); else if (rejoin_gather.count(mds->get_nodeid())) process_imported_caps(); @@ -5349,7 +5349,7 @@ void MDCache::rejoin_open_sessions_finish(map > dout(10) << "rejoin_open_sessions_finish" << dendl; mds->server->finish_force_open_sessions(session_map); rejoin_session_map.swap(session_map); - if (rejoin_gather.empty()) + if (rejoin_gather.empty() && rejoin_ack_gather.count(mds->get_nodeid())) rejoin_gather_finish(); } @@ -5973,7 +5973,7 @@ bool MDCache::open_undef_inodes_dirfrags() MDSGatherBuilder gather(g_ceph_context, new MDSInternalContextWrapper(mds, new LambdaContext([this](int r) { - if (rejoin_gather.empty()) + if (rejoin_gather.empty() && rejoin_ack_gather.count(mds->get_nodeid())) rejoin_gather_finish(); }) )