From 58f46bb94fb22301cbb47ca3d861f256882ccfe0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 9 Jul 2012 20:54:19 -0700 Subject: [PATCH] test_stress_watch: just one librados instance This was creating a new cluster connection/session per iteration, and along with it a few service threads and sockets and so forth. Unfortunately, librados leaks like a sieve, starting with CephContext and ceph::crypto::init(). See #845 and #2067. Signed-off-by: Sage Weil --- src/test/test_stress_watch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/test_stress_watch.cc b/src/test/test_stress_watch.cc index d5cfc9e21ff9b..ec75bd91170b0 100644 --- a/src/test/test_stress_watch.cc +++ b/src/test/test_stress_watch.cc @@ -38,10 +38,10 @@ struct WatcherUnwatcher : public Thread { WatcherUnwatcher(string& _pool) : pool(_pool) {} void *entry() { + Rados cluster; + connect_cluster_pp(cluster); while (!stop_flag.read()) { - Rados cluster; IoCtx ioctx; - connect_cluster_pp(cluster); cluster.ioctx_create(pool.c_str(), ioctx); uint64_t handle; -- 2.39.5