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: v15.2.17~34^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=620facd91e0bd8bfcd9efb90785a16ffb38fc5ad;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 adf46a839e61..4e41cf3a5650 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5323,7 +5323,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(); @@ -5345,7 +5345,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(); } @@ -6001,7 +6001,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(); }) )