From: Yan, Zheng Date: Tue, 8 May 2018 02:42:05 +0000 (+0800) Subject: mds: avoid calling rejoin_gather_finish() two times successively X-Git-Tag: v14.0.0~148^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0451dae777a2a9b1e70303d7bbc4398849f45f3e;p=ceph.git mds: avoid calling rejoin_gather_finish() two times successively If MDCache::rejoin_gather is empty and MDCache::rejoins_pending is true when MDCache::process_imported_caps() calls maybe_send_pending_rejoins() Both MDCache::rejoin_send_rejoins() and MDCache::process_imported_caps() may call rejoin_gather_finish(). Signed-off-by: "Yan, Zheng" Fixes: http://tracker.ceph.com/issues/24047 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 4fff2f803bbb..21ea5c030615 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -4213,7 +4213,7 @@ void MDCache::rejoin_send_rejoins() rejoins_pending = false; // nothing? - if (mds->is_rejoin() && rejoins.empty()) { + if (mds->is_rejoin() && rejoin_gather.empty()) { dout(10) << "nothing to rejoin" << dendl; rejoin_gather_finish(); } @@ -5542,11 +5542,10 @@ bool MDCache::process_imported_caps() } else { trim_non_auth(); + assert(rejoin_gather.count(mds->get_nodeid())); rejoin_gather.erase(mds->get_nodeid()); + assert(!rejoin_ack_gather.count(mds->get_nodeid())); maybe_send_pending_rejoins(); - - if (rejoin_gather.empty() && rejoin_ack_gather.count(mds->get_nodeid())) - rejoin_gather_finish(); } return false; }