comparison Framework/Plugins/IndexBackend.cpp @ 234:d1b124d116c1

PostgreSQL index plugin handles retries for collisions between multiple writers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 Apr 2021 10:50:01 +0200
parents 4e15eace9b90
children 35598014f140
comparison
equal deleted inserted replaced
233:7d46c99523a2 234:d1b124d116c1
2273 assert(result.seriesId != -1); 2273 assert(result.seriesId != -1);
2274 assert(result.instanceId != -1); 2274 assert(result.instanceId != -1);
2275 } 2275 }
2276 2276
2277 2277
2278 void IndexBackend::Register(IndexBackend* backend) 2278 void IndexBackend::Register(IndexBackend* backend,
2279 size_t countConnections,
2280 unsigned int maxDatabaseRetries)
2279 { 2281 {
2280 if (backend == NULL) 2282 if (backend == NULL)
2281 { 2283 {
2282 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); 2284 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
2283 } 2285 }
2286 2288
2287 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1 2289 #if defined(ORTHANC_PLUGINS_VERSION_IS_ABOVE) // Macro introduced in Orthanc 1.3.1
2288 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2) 2290 # if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 9, 2)
2289 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 9, 2) == 1) 2291 if (OrthancPluginCheckVersionAdvanced(backend->GetContext(), 1, 9, 2) == 1)
2290 { 2292 {
2291 OrthancDatabases::DatabaseBackendAdapterV3::Register(backend); 2293 OrthancDatabases::DatabaseBackendAdapterV3::Register(backend, countConnections, maxDatabaseRetries);
2292 hasLoadedV3 = true; 2294 hasLoadedV3 = true;
2293 } 2295 }
2294 # endif 2296 # endif
2295 #endif 2297 #endif
2296 2298