comparison MySQL/Plugins/IndexPlugin.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 c8e06b41feec
children 3bc442765b88
comparison
equal deleted inserted replaced
233:7d46c99523a2 234:d1b124d116c1
60 return 0; 60 return 0;
61 } 61 }
62 62
63 try 63 try
64 { 64 {
65 const size_t countConnections = 5; // TODO - PARAMETER
66 const unsigned int maxDatabaseRetries = 10; // TODO - PARAMETER
67
65 OrthancDatabases::MySQLParameters parameters(mysql, configuration); 68 OrthancDatabases::MySQLParameters parameters(mysql, configuration);
66 OrthancDatabases::IndexBackend::Register(new OrthancDatabases::MySQLIndex(context, parameters)); 69 OrthancDatabases::IndexBackend::Register(
70 new OrthancDatabases::MySQLIndex(context, parameters), countConnections, maxDatabaseRetries);
67 } 71 }
68 catch (Orthanc::OrthancException& e) 72 catch (Orthanc::OrthancException& e)
69 { 73 {
70 LOG(ERROR) << e.What(); 74 LOG(ERROR) << e.What();
71 return -1; 75 return -1;