From: JINMEI Tatuya Date: Fri, 5 Oct 2012 23:52:37 +0000 (-0700) Subject: [2204] regression fix: make sure the datasrc config is installed to server. X-Git-Tag: trac2351_base~1^2~8^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b6e74f544b522943436bfdff79c2fa06273b49d;p=thirdparty%2Fkea.git [2204] regression fix: make sure the datasrc config is installed to server. --- diff --git a/src/bin/auth/benchmarks/query_bench.cc b/src/bin/auth/benchmarks/query_bench.cc index d732f945be..a319555140 100644 --- a/src/bin/auth/benchmarks/query_bench.cc +++ b/src/bin/auth/benchmarks/query_bench.cc @@ -18,6 +18,8 @@ #include #include +#include + #include #include #include @@ -125,12 +127,15 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - configureDataSource( - Element::fromJSON("{\"IN\":" - " [{\"type\": \"sqlite3\"," - " \"params\": {" - " \"database_file\": \"" + - string(datasrc_file) + "\"}}]}")); + isc::util::thread::Mutex::Locker locker( + server_->getClientListMutex()); + server_->swapDataSrcClientLists( + configureDataSource( + Element::fromJSON("{\"IN\":" + " [{\"type\": \"sqlite3\"," + " \"params\": {" + " \"database_file\": \"" + + string(datasrc_file) + "\"}}]}"))); } }; @@ -143,13 +148,16 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - configureDataSource( - Element::fromJSON("{\"IN\":" - " [{\"type\": \"MasterFiles\"," - " \"cache-enable\": true, " - " \"params\": {\"" + - string(zone_origin) + "\": \"" + - string(zone_file) + "\"}}]}")); + isc::util::thread::Mutex::Locker locker( + server_->getClientListMutex()); + server_->swapDataSrcClientLists( + configureDataSource( + Element::fromJSON("{\"IN\":" + " [{\"type\": \"MasterFiles\"," + " \"cache-enable\": true, " + " \"params\": {\"" + + string(zone_origin) + "\": \"" + + string(zone_file) + "\"}}]}"))); } };