Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
e0050b9e
Commit
e0050b9e
authored
7 years ago
by
Eric Cano
Browse files
Options
Downloads
Patches
Plain Diff
Fixed function name in error strings.
parent
1747d830
No related branches found
Branches containing commit
Tags
v0.0-21
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scheduler/OStoreDB/MemQueues.hpp
+9
-9
9 additions, 9 deletions
scheduler/OStoreDB/MemQueues.hpp
with
9 additions
and
9 deletions
scheduler/OStoreDB/MemQueues.hpp
+
9
−
9
View file @
e0050b9e
...
...
@@ -202,7 +202,7 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
utils
::
Timer
timer
;
// Re-check the queue is not there
if
(
g_queues
.
end
()
!=
g_queues
.
find
(
queueIndex
))
{
throw
cta
::
exception
::
Exception
(
"In Mem
Archive
Queue::sharedAddTo
ArchiveQueueWith
NewQueue(): the queue is present, while it should not!"
);
throw
cta
::
exception
::
Exception
(
"In MemQueue::sharedAddToNewQueue(): the queue is present, while it should not!"
);
}
// Create the queue and reference it.
auto
maq
=
(
g_queues
[
queueIndex
]
=
std
::
make_shared
<
MemQueue
>
());
...
...
@@ -215,7 +215,7 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
try
{
futureFromPredecessor
=
std
::
move
(
g_futures
.
at
(
queueIndex
));
}
catch
(
std
::
out_of_range
&
)
{
throw
cta
::
exception
::
Exception
(
"In Mem
Archive
Queue::sharedAddTo
ArchiveQueueWith
NewQueue(): the future is not present, while it should!"
);
throw
cta
::
exception
::
Exception
(
"In MemQueue::sharedAddToNewQueue(): the future is not present, while it should!"
);
}
}
// Create the promise and future for successor.
...
...
@@ -235,10 +235,10 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
// Remove the queue for our tape pool. It should be present.
try
{
if
(
g_queues
.
at
(
queueIndex
).
get
()
!=
maq
.
get
())
{
throw
cta
::
exception
::
Exception
(
"In Mem
Archive
Queue::sharedAddTo
ArchiveQueueWith
NewQueue(): the queue is not ours, while it should!"
);
throw
cta
::
exception
::
Exception
(
"In MemQueue::sharedAddToNewQueue(): the queue is not ours, while it should!"
);
}
}
catch
(
std
::
out_of_range
&
)
{
throw
cta
::
exception
::
Exception
(
"In Mem
Archive
Queue::sharedAddTo
ArchiveQueueWith
NewQueue(): the queue is not present, while it should!"
);
throw
cta
::
exception
::
Exception
(
"In MemQueue::sharedAddToNewQueue(): the queue is not present, while it should!"
);
}
// Checks are fine, let's just drop the queue from the map
g_queues
.
erase
(
queueIndex
);
...
...
@@ -295,7 +295,7 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
.
add
(
"addedJobs"
,
addedJobs
)
.
add
(
"waitTime"
,
waitTime
)
.
add
(
"enqueueTime"
,
timer
.
secs
());
logContext
.
log
(
log
::
INFO
,
"In Mem
Archive
Queue::sharedAddTo
Archive
Queue(): added batch of jobs to the queue."
);
logContext
.
log
(
log
::
INFO
,
"In MemQueue::sharedAddTo
New
Queue(): added batch of jobs to the queue."
);
}
// We will also count how much time we mutually wait for the other threads.
ret
->
m_timer
.
reset
();
...
...
@@ -327,9 +327,9 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
}
catch
(
cta
::
exception
::
Exception
&
ex
)
{
log
::
ScopedParamContainer
params
(
logContext
);
params
.
add
(
"message"
,
ex
.
getMessageValue
());
logContext
.
log
(
log
::
ERR
,
"In Mem
Archive
Queue::sharedAddTo
Archive
Queue(): got an exception writing. Will propagate to other threads."
);
logContext
.
log
(
log
::
ERR
,
"In MemQueue::sharedAddTo
New
Queue(): got an exception writing. Will propagate to other threads."
);
}
catch
(...)
{
logContext
.
log
(
log
::
ERR
,
"In Mem
Archive
Queue::sharedAddTo
Archive
Queue(): got a non cta exception writing. Will propagate to other threads."
);
logContext
.
log
(
log
::
ERR
,
"In MemQueue::sharedAddTo
New
Queue(): got a non cta exception writing. Will propagate to other threads."
);
}
size_t
exceptionsNotPassed
=
0
;
// Something went wrong. We should inform the other threads
...
...
@@ -348,13 +348,13 @@ std::shared_ptr<SharedQueueLock<Queue>> MemQueue<Request, Queue>::sharedAddToNew
std
::
rethrow_exception
(
std
::
current_exception
());
}
catch
(
std
::
exception
&
ex
)
{
std
::
stringstream
err
;
err
<<
"In Mem
Archive
Queue::sharedAddTo
Archive
Queue(), in main thread, failed to notify "
err
<<
"In MemQueue::sharedAddTo
New
Queue(), in main thread, failed to notify "
<<
exceptionsNotPassed
<<
" other threads out of "
<<
maq
->
m_requests
.
size
()
<<
" : "
<<
ex
.
what
();
log
::
ScopedParamContainer
params
(
logContext
);
params
.
add
(
"what"
,
ex
.
what
())
.
add
(
"exceptionsNotPassed"
,
exceptionsNotPassed
);
logContext
.
log
(
log
::
ERR
,
"In Mem
Archive
Queue::sharedAddTo
Archive
Queue(): Failed to propagate exceptions to other threads."
);
logContext
.
log
(
log
::
ERR
,
"In MemQueue::sharedAddTo
New
Queue(): Failed to propagate exceptions to other threads."
);
throw
cta
::
exception
::
Exception
(
err
.
str
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment