changeset 590:14bd2e248417 find-refactoring

PG: new default values for configurations TransactionMode & IndexConnectionsCount
author Alain Mazy <am@orthanc.team>
date Wed, 06 Nov 2024 12:43:33 +0100
parents 8d75255b4272
children 44451bed9a25
files Framework/PostgreSQL/PostgreSQLParameters.cpp PostgreSQL/NEWS PostgreSQL/Plugins/IndexPlugin.cpp
diffstat 3 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLParameters.cpp	Wed Nov 06 10:46:49 2024 +0100
+++ b/Framework/PostgreSQL/PostgreSQLParameters.cpp	Wed Nov 06 12:43:33 2024 +0100
@@ -102,7 +102,7 @@
     maxConnectionRetries_ = configuration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10);
     connectionRetryInterval_ = configuration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5);
 
-    std::string transactionMode = configuration.GetStringValue("TransactionMode", "Serializable");
+    std::string transactionMode = configuration.GetStringValue("TransactionMode", "ReadCommitted");
     if (transactionMode == "ReadCommitted")
     {
       LOG(WARNING) << "PostgreSQL: using READ COMMITTED transaction mode";
--- a/PostgreSQL/NEWS	Wed Nov 06 10:46:49 2024 +0100
+++ b/PostgreSQL/NEWS	Wed Nov 06 12:43:33 2024 +0100
@@ -16,6 +16,9 @@
   - reduced the number of round-trips between Orthanc and the PostgreSQL server:
     - e.g: when receiving an instance in an existing series, reduced the number of SQL queries from 13 to 9
 * Fixed a memory leak when executing non cached SQL statements (rarely used)
+* New default values for configurations:
+  - "IndexConnectionsCount": 50
+  - "TransactionMode": "ReadCommitted"
 
 
 Release 6.2 (2024-03-25)
--- a/PostgreSQL/Plugins/IndexPlugin.cpp	Wed Nov 06 10:46:49 2024 +0100
+++ b/PostgreSQL/Plugins/IndexPlugin.cpp	Wed Nov 06 12:43:33 2024 +0100
@@ -74,7 +74,7 @@
     
     try
     {
-      const size_t countConnections = postgresql.GetUnsignedIntegerValue("IndexConnectionsCount", 1);
+      const size_t countConnections = postgresql.GetUnsignedIntegerValue("IndexConnectionsCount", 50);
 
       OrthancDatabases::PostgreSQLParameters parameters(postgresql);
       OrthancDatabases::IndexBackend::Register(