]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: by default, do not assert on leaks in the shared_cache code 21184/head
authorGreg Farnum <gfarnum@redhat.com>
Mon, 9 Oct 2017 21:16:05 +0000 (14:16 -0700)
committerNathan Cutler <ncutler@suse.com>
Tue, 3 Apr 2018 04:02:49 +0000 (06:02 +0200)
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 <gfarnum@redhat.com>
(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

src/common/config_opts.h
src/common/shared_cache.hpp

index 8b6fb27b2120cdfbe0df3421ccbf707b9a455438..c925f4b5fbe4ef325787f209d65b1a881d1d512a 100644 (file)
@@ -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
index 8ff949084a6ebd7713841a02b69da3088363a24b..6f818b21fcc731a20885961de7f13fb641c63994 100644 (file)
@@ -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());
+      }
     }
   }