Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
622ec286
Commit
622ec286
authored
Feb 02, 2019
by
Steven Murray
Browse files
Removed unused maxTriesToConnect parameter from InMemoryCatalogue constructor
parent
7a43dc08
Changes
8
Hide whitespace changes
Inline
Side-by-side
catalogue/CatalogueFactory.cpp
View file @
622ec286
...
...
@@ -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
:
...
...
catalogue/InMemoryCatalogue.cpp
View file @
622ec286
...
...
@@ -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
)
{
}
//------------------------------------------------------------------------------
...
...
catalogue/InMemoryCatalogue.hpp
View file @
622ec286
...
...
@@ -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.
...
...
catalogue/InMemoryCatalogueTest.cpp
View file @
622ec286
...
...
@@ -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
);
}
}
...
...
catalogue/SchemaCreatingSqliteCatalogue.cpp
View file @
622ec286
...
...
@@ -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
();
...
...
catalogue/SchemaCreatingSqliteCatalogue.hpp
View file @
622ec286
...
...
@@ -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.
...
...
scheduler/SchedulerTest.cpp
View file @
622ec286
...
...
@@ -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
);
}
...
...
tapeserver/castor/tape/tapeserver/daemon/DataTransferSessionTest.cpp
View file @
622ec286
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment