Commit 622ec286 authored by Steven Murray's avatar Steven Murray
Browse files

Removed unused maxTriesToConnect parameter from InMemoryCatalogue constructor

parent 7a43dc08
...@@ -41,7 +41,7 @@ std::unique_ptr<Catalogue> CatalogueFactory::create( ...@@ -41,7 +41,7 @@ std::unique_ptr<Catalogue> CatalogueFactory::create(
switch(login.dbType) { switch(login.dbType) {
case rdbms::Login::DBTYPE_IN_MEMORY: case rdbms::Login::DBTYPE_IN_MEMORY:
{ {
auto c = cta::make_unique<InMemoryCatalogue>(log, nbConns, nbArchiveFileListingConns, maxTriesToConnect); auto c = cta::make_unique<InMemoryCatalogue>(log, nbConns, nbArchiveFileListingConns);
return cta::make_unique<CatalogueRetryWrapper>(log, std::move(c), maxTriesToConnect); return cta::make_unique<CatalogueRetryWrapper>(log, std::move(c), maxTriesToConnect);
} }
case rdbms::Login::DBTYPE_ORACLE: case rdbms::Login::DBTYPE_ORACLE:
......
...@@ -27,10 +27,8 @@ namespace catalogue { ...@@ -27,10 +27,8 @@ namespace catalogue {
InMemoryCatalogue::InMemoryCatalogue( InMemoryCatalogue::InMemoryCatalogue(
log::Logger &log, log::Logger &log,
const uint64_t nbConns, const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns, const uint64_t nbArchiveFileListingConns):
const uint32_t maxTriesToConnect): SchemaCreatingSqliteCatalogue(log, "file::memory:?cache=shared", nbConns, nbArchiveFileListingConns) {
SchemaCreatingSqliteCatalogue(log, "file::memory:?cache=shared", nbConns, nbArchiveFileListingConns,
maxTriesToConnect) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -41,15 +41,11 @@ public: ...@@ -41,15 +41,11 @@ public:
* @param nbArchiveFileListingConns The maximum number of concurrent * @param nbArchiveFileListingConns The maximum number of concurrent
* connections to the underlying relational database for the sole purpose of * connections to the underlying relational database for the sole purpose of
* listing archive files. * listing archive files.
* @param maxTriesToConnext The maximum number of times a single method should
* try to connect to the database in the event of LostDatabaseConnection
* exceptions being thrown.
*/ */
InMemoryCatalogue( InMemoryCatalogue(
log::Logger &log, log::Logger &log,
const uint64_t nbConns, const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns, const uint64_t nbArchiveFileListingConns);
const uint32_t maxTriesToConnect);
/** /**
* Destructor. * Destructor.
......
...@@ -39,16 +39,15 @@ TEST_F(cta_catalogue_InMemoryCatalogue, createSameSchemaInTwoSeparateInMemoryDat ...@@ -39,16 +39,15 @@ TEST_F(cta_catalogue_InMemoryCatalogue, createSameSchemaInTwoSeparateInMemoryDat
log::DummyLogger dummyLog("dummy", "dummy"); log::DummyLogger dummyLog("dummy", "dummy");
const uint64_t nbConns = 1; const uint64_t nbConns = 1;
const uint64_t nbArchiveFileListingConns = 0; const uint64_t nbArchiveFileListingConns = 0;
const uint32_t maxTriesToConnect = 1;
// First in-memory database // First in-memory database
{ {
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns, maxTriesToConnect); catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns);
} }
// Second in-memory database // Second in-memory database
{ {
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns, maxTriesToConnect); catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns);
} }
} }
......
...@@ -29,8 +29,7 @@ SchemaCreatingSqliteCatalogue::SchemaCreatingSqliteCatalogue( ...@@ -29,8 +29,7 @@ SchemaCreatingSqliteCatalogue::SchemaCreatingSqliteCatalogue(
log::Logger &log, log::Logger &log,
const std::string &filename, const std::string &filename,
const uint64_t nbConns, const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns, const uint64_t nbArchiveFileListingConns):
const uint32_t maxTriesToConnect):
SqliteCatalogue(log, filename, nbConns, nbArchiveFileListingConns) { SqliteCatalogue(log, filename, nbConns, nbArchiveFileListingConns) {
try { try {
createCatalogueSchema(); createCatalogueSchema();
......
...@@ -42,16 +42,12 @@ public: ...@@ -42,16 +42,12 @@ public:
* @param nbArchiveFileListingConns The maximum number of concurrent * @param nbArchiveFileListingConns The maximum number of concurrent
* connections to the underlying relational database for the sole purpose of * connections to the underlying relational database for the sole purpose of
* listing archive files. * listing archive files.
* @param maxTriesToConnext The maximum number of times a single method should
* try to connect to the database in the event of LostDatabaseConnection
* exceptions being thrown.
*/ */
SchemaCreatingSqliteCatalogue( SchemaCreatingSqliteCatalogue(
log::Logger &log, log::Logger &log,
const std::string &filename, const std::string &filename,
const uint64_t nbConns, const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns, const uint64_t nbArchiveFileListingConns);
const uint32_t maxTriesToConnect);
/** /**
* Destructor. * Destructor.
......
...@@ -98,10 +98,8 @@ public: ...@@ -98,10 +98,8 @@ public:
m_db = param.dbFactory.create(); m_db = param.dbFactory.create();
const uint64_t nbConns = 1; const uint64_t nbConns = 1;
const uint64_t nbArchiveFileListingConns = 1; const uint64_t nbArchiveFileListingConns = 1;
const uint32_t maxTriesToConnect = 1;
//m_catalogue = cta::make_unique<catalogue::SchemaCreatingSqliteCatalogue>(m_tempSqliteFile.path(), nbConns); //m_catalogue = cta::make_unique<catalogue::SchemaCreatingSqliteCatalogue>(m_tempSqliteFile.path(), nbConns);
m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns, m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns);
maxTriesToConnect);
m_scheduler = cta::make_unique<Scheduler>(*m_catalogue, *m_db, 5, 2*1000*1000); m_scheduler = cta::make_unique<Scheduler>(*m_catalogue, *m_db, 5, 2*1000*1000);
} }
......
...@@ -129,7 +129,6 @@ public: ...@@ -129,7 +129,6 @@ public:
m_db = param.dbFactory.create(); m_db = param.dbFactory.create();
const uint64_t nbConns = 1; const uint64_t nbConns = 1;
const uint64_t nbArchiveFileListingConns = 1; const uint64_t nbArchiveFileListingConns = 1;
const uint32_t maxTriesToConnect = 1;
#ifdef USE_ORACLE_CATALOGUE #ifdef USE_ORACLE_CATALOGUE
cta::rdbms::Login login=cta::rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf"); cta::rdbms::Login login=cta::rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf");
...@@ -147,8 +146,7 @@ public: ...@@ -147,8 +146,7 @@ public:
} catch (std::bad_cast &) {} } catch (std::bad_cast &) {}
#else #else
//m_catalogue = cta::make_unique<catalogue::SchemaCreatingSqliteCatalogue>(m_tempSqliteFile.path(), nbConns); //m_catalogue = cta::make_unique<catalogue::SchemaCreatingSqliteCatalogue>(m_tempSqliteFile.path(), nbConns);
m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns, m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns);
maxTriesToConnect);
#endif #endif
m_scheduler = cta::make_unique<Scheduler>(*m_catalogue, *m_db, 5, 2*1000*1000); m_scheduler = cta::make_unique<Scheduler>(*m_catalogue, *m_db, 5, 2*1000*1000);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment