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
b944306c
Commit
b944306c
authored
Aug 22, 2016
by
Eric Cano
Browse files
Disregard possible leftover session for current drive.
parent
facb720a
Changes
3
Hide whitespace changes
Inline
Side-by-side
scheduler/OStoreDB/OStoreDB.cpp
View file @
b944306c
...
...
@@ -142,6 +142,7 @@ std::unique_ptr<SchedulerDatabase::TapeMountDecisionInfo>
tmdi
.
existingMounts
.
push_back
(
ExistingMount
());
tmdi
.
existingMounts
.
back
().
type
=
d
->
mountType
;
tmdi
.
existingMounts
.
back
().
tapePool
=
d
->
currentTapePool
;
tmdi
.
existingMounts
.
back
().
driveName
=
d
->
name
;
}
}
std
::
unique_ptr
<
SchedulerDatabase
::
TapeMountDecisionInfo
>
ret
(
std
::
move
(
privateRet
));
...
...
scheduler/Scheduler.cpp
View file @
b944306c
...
...
@@ -353,11 +353,14 @@ std::unique_ptr<cta::TapeMount> cta::Scheduler::getNextMount(const std::string &
// with the per tape pool existing mount statistics.
typedef
std
::
pair
<
std
::
string
,
cta
::
MountType
::
Enum
>
tpType
;
std
::
map
<
tpType
,
uint32_t
>
existingMountsSummary
;
for
(
auto
em
=
mountInfo
->
existingMounts
.
begin
();
em
!=
mountInfo
->
existingMounts
.
end
();
em
++
)
{
try
{
existingMountsSummary
.
at
(
tpType
(
em
->
tapePool
,
em
->
type
))
++
;
}
catch
(
std
::
out_of_range
&
)
{
existingMountsSummary
[
tpType
(
em
->
tapePool
,
em
->
type
)]
=
1
;
for
(
auto
&
em
:
mountInfo
->
existingMounts
)
{
// If a mount is still listed for our own drive, it is a leftover that we disregard.
if
(
em
.
driveName
!=
driveName
)
{
try
{
existingMountsSummary
.
at
(
tpType
(
em
.
tapePool
,
em
.
type
))
++
;
}
catch
(
std
::
out_of_range
&
)
{
existingMountsSummary
[
tpType
(
em
.
tapePool
,
em
.
type
)]
=
1
;
}
}
}
...
...
scheduler/SchedulerDatabase.hpp
View file @
b944306c
...
...
@@ -366,6 +366,7 @@ public:
* Information about the existing mounts.
*/
struct
ExistingMount
{
std
::
string
driveName
;
cta
::
MountType
::
Enum
type
;
std
::
string
tapePool
;
};
...
...
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