From 5a09add4c5eeceeedc07aa604cfec98181d8d906 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 18 Jan 2019 16:18:59 -0800 Subject: [PATCH] mds: add throttle for trimming MDCache This is necessary when the MDS cache size decreases by a significant amount. For example, when stopping a large MDS or when the operator makes a large cache size reduction. Fixes: http://tracker.ceph.com/issues/37723 Signed-off-by: Patrick Donnelly (cherry picked from commit 7bf2f31abf069b9bafc52bc1478292bb8a6c71b8) Conflicts: PendingReleaseNotes src/common/options.cc src/mds/MDCache.cc src/mds/MDCache.h --- PendingReleaseNotes | 4 ++++ src/common/options.cc | 8 ++++++++ src/mds/MDCache.cc | 48 +++++++++++++++++++++++++++++++++---------- src/mds/MDCache.h | 9 ++++++-- src/mds/MDSDaemon.cc | 1 + 5 files changed, 57 insertions(+), 13 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 05f7f44ae7ee9..88add63e24449 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -12,6 +12,10 @@ validated and providing a keyring with an invalid caps string to, e.g., "ceph auth add" will result in an error. +* The MDS cache trimming is now throttled. Dropping the MDS cache + via the `ceph tell mds. cache drop` command or large reductions in the + cache size will no longer cause service unavailability. + >= 12.1.2 --------- * When running 'df' on a CephFS filesystem comprising exactly one data pool, diff --git a/src/common/options.cc b/src/common/options.cc index d452fc73faec0..57468a332088f 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -6098,6 +6098,14 @@ std::vector