changeset 714:c1b73bf5c122 sql-opti

removed connectionsMutex_ from BaseIndexConnectionsPool as it is defined in subclasses
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 Aug 2025 18:01:19 +0200
parents 004d853bdf69
children 7c0157bf749c
files Framework/Plugins/BaseIndexConnectionsPool.h Framework/Plugins/IndexUnitTests.h
diffstat 2 files changed, 5 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Plugins/BaseIndexConnectionsPool.h	Fri Aug 08 17:51:05 2025 +0200
+++ b/Framework/Plugins/BaseIndexConnectionsPool.h	Fri Aug 08 18:01:19 2025 +0200
@@ -37,10 +37,8 @@
   class BaseIndexConnectionsPool : public boost::noncopyable
   {
   protected:
-
     std::unique_ptr<IndexBackend>  backend_;
     OrthancPluginContext*          context_;
-    boost::mutex                   connectionsMutex_;
 
     bool                           housekeepingContinue_;
     boost::thread                  housekeepingThread_;
--- a/Framework/Plugins/IndexUnitTests.h	Fri Aug 08 17:51:05 2025 +0200
+++ b/Framework/Plugins/IndexUnitTests.h	Fri Aug 08 18:01:19 2025 +0200
@@ -785,13 +785,12 @@
     // column in "ServerProperties" is "TEXT" instead of "LONGTEXT"
     db.SetGlobalProperty(*manager, "some-server", Orthanc::GlobalProperty_DatabaseInternal8, longProperty.c_str());
 
-    std::string tmp;
-    ASSERT_TRUE(db.LookupGlobalProperty(tmp, *manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseInternal8));
-    ASSERT_EQ(longProperty, tmp);
+    ASSERT_TRUE(db.LookupGlobalProperty(s, *manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseInternal8));
+    ASSERT_EQ(longProperty, s);
 
-    tmp.clear();
-    ASSERT_TRUE(db.LookupGlobalProperty(tmp, *manager, "some-server", Orthanc::GlobalProperty_DatabaseInternal8));
-    ASSERT_EQ(longProperty, tmp);
+    s.clear();
+    ASSERT_TRUE(db.LookupGlobalProperty(s, *manager, "some-server", Orthanc::GlobalProperty_DatabaseInternal8));
+    ASSERT_EQ(longProperty, s);
   }
 
   for (size_t level = 0; level < 4; level++)