From 2f6a2e484a7c4838a11e0696323c5a38efa1c6cc Mon Sep 17 00:00:00 2001 From: JINMEI Tatuya Date: Fri, 19 Oct 2012 22:56:39 -0700 Subject: [PATCH] [2211] use data source client mgr for query_bench --- src/bin/auth/benchmarks/query_bench.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/bin/auth/benchmarks/query_bench.cc b/src/bin/auth/benchmarks/query_bench.cc index 44aeb8da8e..2bc674d2ca 100644 --- a/src/bin/auth/benchmarks/query_bench.cc +++ b/src/bin/auth/benchmarks/query_bench.cc @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include #include #include @@ -127,9 +127,9 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - isc::util::thread::Mutex::Locker locker( - server_->getDataSrcClientListMutex()); - server_->swapDataSrcClientLists( + // Note: swapDataSrcClientLists() may be deprecated, but until then + // we use it because we want to be synchronized with the server. + server_->getDataSrcClientsMgr().swapDataSrcClientLists( configureDataSource( Element::fromJSON("{\"IN\":" " [{\"type\": \"sqlite3\"," @@ -148,9 +148,7 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - isc::util::thread::Mutex::Locker locker( - server_->getDataSrcClientListMutex()); - server_->swapDataSrcClientLists( + server_->getDataSrcClientsMgr().swapDataSrcClientLists( configureDataSource( Element::fromJSON("{\"IN\":" " [{\"type\": \"MasterFiles\","