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(
switch(login.dbType) {
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);
}
case rdbms::Login::DBTYPE_ORACLE:
......
......@@ -27,10 +27,8 @@ namespace catalogue {
InMemoryCatalogue::InMemoryCatalogue(
log::Logger &log,
const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns,
const uint32_t maxTriesToConnect):
SchemaCreatingSqliteCatalogue(log, "file::memory:?cache=shared", nbConns, nbArchiveFileListingConns,
maxTriesToConnect) {
const uint64_t nbArchiveFileListingConns):
SchemaCreatingSqliteCatalogue(log, "file::memory:?cache=shared", nbConns, nbArchiveFileListingConns) {
}
//------------------------------------------------------------------------------
......
......@@ -41,15 +41,11 @@ public:
* @param nbArchiveFileListingConns The maximum number of concurrent
* connections to the underlying relational database for the sole purpose of
* 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(
log::Logger &log,
const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns,
const uint32_t maxTriesToConnect);
const uint64_t nbArchiveFileListingConns);
/**
* Destructor.
......
......@@ -39,16 +39,15 @@ TEST_F(cta_catalogue_InMemoryCatalogue, createSameSchemaInTwoSeparateInMemoryDat
log::DummyLogger dummyLog("dummy", "dummy");
const uint64_t nbConns = 1;
const uint64_t nbArchiveFileListingConns = 0;
const uint32_t maxTriesToConnect = 1;
// First in-memory database
{
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns, maxTriesToConnect);
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns);
}
// Second in-memory database
{
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns, maxTriesToConnect);
catalogue::InMemoryCatalogue inMemoryCatalogue(dummyLog, nbConns, nbArchiveFileListingConns);
}
}
......
......@@ -29,8 +29,7 @@ SchemaCreatingSqliteCatalogue::SchemaCreatingSqliteCatalogue(
log::Logger &log,
const std::string &filename,
const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns,
const uint32_t maxTriesToConnect):
const uint64_t nbArchiveFileListingConns):
SqliteCatalogue(log, filename, nbConns, nbArchiveFileListingConns) {
try {
createCatalogueSchema();
......
......@@ -42,16 +42,12 @@ public:
* @param nbArchiveFileListingConns The maximum number of concurrent
* connections to the underlying relational database for the sole purpose of
* 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(
log::Logger &log,
const std::string &filename,
const uint64_t nbConns,
const uint64_t nbArchiveFileListingConns,
const uint32_t maxTriesToConnect);
const uint64_t nbArchiveFileListingConns);
/**
* Destructor.
......
......@@ -98,10 +98,8 @@ public:
m_db = param.dbFactory.create();
const uint64_t nbConns = 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::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns,
maxTriesToConnect);
m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns);
m_scheduler = cta::make_unique<Scheduler>(*m_catalogue, *m_db, 5, 2*1000*1000);
}
......
......@@ -129,7 +129,6 @@ public:
m_db = param.dbFactory.create();
const uint64_t nbConns = 1;
const uint64_t nbArchiveFileListingConns = 1;
const uint32_t maxTriesToConnect = 1;
#ifdef USE_ORACLE_CATALOGUE
cta::rdbms::Login login=cta::rdbms::Login::parseFile("/etc/cta/cta-catalogue.conf");
......@@ -147,8 +146,7 @@ public:
} catch (std::bad_cast &) {}
#else
//m_catalogue = cta::make_unique<catalogue::SchemaCreatingSqliteCatalogue>(m_tempSqliteFile.path(), nbConns);
m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns,
maxTriesToConnect);
m_catalogue = cta::make_unique<catalogue::InMemoryCatalogue>(m_dummyLog, nbConns, nbArchiveFileListingConns);
#endif
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