From 7bf2f31abf069b9bafc52bc1478292bb8a6c71b8 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 --- PendingReleaseNotes | 4 ++++ src/common/options.cc | 8 ++++++++ src/mds/MDCache.cc | 46 +++++++++++++++++++++++++++++++++---------- src/mds/MDCache.h | 9 +++++++-- src/mds/MDSDaemon.cc | 1 + 5 files changed, 56 insertions(+), 12 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 166dfaabd4b..61424bc62f4 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -165,6 +165,10 @@ respectively. This is to clarify that these warnings are related to pg scrubbing and are a ratio of the related interval. These options are now enabled by default. +* 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. + >=13.1.0 -------- diff --git a/src/common/options.cc b/src/common/options.cc index d3b57a7ef81..8d03bbc5c25 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -7179,6 +7179,14 @@ std::vector