From: Greg Farnum Date: Mon, 9 Oct 2017 21:16:05 +0000 (-0700) Subject: common: by default, do not assert on leaks in the shared_cache code X-Git-Tag: v10.2.11~64^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=44c44c6765bfea56bd3ea83ccadd14dce8faebd2;p=ceph.git common: by default, do not assert on leaks in the shared_cache code Update the standard qa suite cluster configs so that we continue asserting in our nightlies, but users don't hit this. Fixes: http://tracker.ceph.com/issues/21737 Signed-off-by: Greg Farnum (cherry picked from commit 165b61a7df2731602e9e28c5107a873444bf0507) Conflicts: src/common/options.cc - file does not exist in jewel; manually backported the change to src/common/config_opts.h src/common/shared_cache.hpp - use jewel programming convention for accessing config option values --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 8b6fb27b2120c..c925f4b5fbe4e 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -1485,5 +1485,6 @@ OPTION(throttler_perf_counter, OPT_BOOL, true) // enable/disable throttler perf OPTION(internal_safe_to_start_threads, OPT_BOOL, false) OPTION(debug_deliberately_leak_memory, OPT_BOOL, false) +OPTION(debug_asserts_on_shutdown, OPT_BOOL, false) OPTION(rgw_swift_custom_header, OPT_STR, "") // option to enable swift custom headers diff --git a/src/common/shared_cache.hpp b/src/common/shared_cache.hpp index 8ff949084a6eb..6f818b21fcc73 100644 --- a/src/common/shared_cache.hpp +++ b/src/common/shared_cache.hpp @@ -104,7 +104,9 @@ public: lderr(cct) << "leaked refs:\n"; dump_weak_refs(*_dout); *_dout << dendl; - assert(weak_refs.empty()); + if (cct->_conf->debug_asserts_on_shutdown) { + assert(weak_refs.empty()); + } } }