From: Sage Weil Date: Tue, 10 Jul 2012 03:54:19 +0000 (-0700) Subject: test_stress_watch: just one librados instance X-Git-Tag: v0.50~87^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=58f46bb94fb22301cbb47ca3d861f256882ccfe0;p=ceph.git 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 --- diff --git a/src/test/test_stress_watch.cc b/src/test/test_stress_watch.cc index d5cfc9e21ff9..ec75bd91170b 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;