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" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/24047
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();
}
} 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;
}