These are asynchronously flushed periodically. If the MDS plans to abort (and
we know messages are pending), it needs to manually trigger a flush.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit
59c5a50bd9e69d58b4cdb9eff68b55fb2ccb4f29)
}
if (!load && g_conf().get_val<bool>("mds_abort_on_newly_corrupt_dentry")) {
dir->mdcache->mds->clog->error() << "MDS abort because newly corrupt dentry to be committed: " << *this;
- ceph_abort("detected newly corrupt dentry"); /* avoid writing out newly corrupted dn */
+ dir->mdcache->mds->abort("detected newly corrupt dentry"); /* avoid writing out newly corrupted dn */
}
return true;
}
}
}
+void MDSRank::abort(std::string_view msg)
+{
+ monc->flush_log();
+ ceph_abort(msg);
+}
+
void MDSRank::damaged()
{
ceph_assert(whoami != MDS_RANK_NONE);
return count * _heartbeat_reset_grace;
}
+ /**
+ * Abort the MDS and flush any clog messages.
+ *
+ * Callers must already hold mds_lock.
+ */
+ void abort(std::string_view msg);
+
/**
* Report state DAMAGED to the mon, and then pass on to respawn(). Call
* this when an unrecoverable error is encountered while attempting