A standby MDS can attempt the handle_mds_failure paths for itself, if
it sees the transition from up to down. This leads it to insert itself
into the resolve_gather set, which is bad. So check if the failed MDS
is the same as whoami, and abort if so. This fixes #4637.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
void MDS::handle_mds_failure(int who)
{
+ if (who == whoami) {
+ dout(5) << "handle_mds_failure for myself; not doing anything" << dendl;
+ return;
+ }
dout(5) << "handle_mds_failure mds." << who << dendl;
mdcache->handle_mds_failure(who);