From 03c96c2a2cce6ccd0e914bcf8b102080ab6e3fb6 Mon Sep 17 00:00:00 2001 From: chencan Date: Wed, 2 Dec 2020 15:55:32 +0800 Subject: [PATCH] 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) --- src/mds/MDCache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index b368dff83ebe0..e9cbf7141c4c3 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(); }) ) -- 2.39.5