From d0747a37fd06053b2206bb9a952f7ab77f0db2f0 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Mon, 4 Sep 2017 11:36:00 -0700 Subject: [PATCH] mds: print subtrees only after merge During up:resolve, the MDS tries to merge each subtree with its parent. During testing, QE found that many thousands of subtrees in a directory (made possible using pins) would cause the MDS to spend minutes printing out subtree maps to the debug log. This causes the heartbeat code to consider the MDS as stalled so beacons are no longer sent to the mons resulting in the MDS being removed from the rank. A more complete solution to this problem is to selectively print subtrees relating to the operation (e.g. the subtree and its parents). Fixes: http://tracker.ceph.com/issues/21221 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1485783 Signed-off-by: Patrick Donnelly --- src/mds/MDCache.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e6600dbd4ea..17023bb2050 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -941,9 +941,9 @@ void MDCache::try_subtree_merge_at(CDir *dir, set *to_eval) if (to_eval && dir->get_inode()->is_auth()) to_eval->insert(dir->get_inode()); - } - show_subtrees(15); + show_subtrees(15); + } } void MDCache::subtree_merge_writebehind_finish(CInode *in, MutationRef& mut) -- 2.39.5