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
7d041c36
Commit
7d041c36
authored
9 years ago
by
Eric Cano
Browse files
Options
Downloads
Patches
Plain Diff
Fixed memory leak in case of exception.
parent
64b9bad8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
+8
-7
8 additions, 7 deletions
...rver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.hpp
+1
-1
1 addition, 1 deletion
...rver/castor/tape/tapeserver/daemon/RecallTaskInjector.hpp
with
9 additions
and
8 deletions
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.cpp
+
8
−
7
View file @
7d041c36
...
...
@@ -85,7 +85,7 @@ void RecallTaskInjector::startThreads() {
//------------------------------------------------------------------------------
//injectBulkRecalls
//------------------------------------------------------------------------------
void
RecallTaskInjector
::
injectBulkRecalls
(
const
std
::
vector
<
cta
::
RetrieveJob
*
>&
jobs
)
{
void
RecallTaskInjector
::
injectBulkRecalls
(
std
::
vector
<
std
::
unique_ptr
<
cta
::
RetrieveJob
>
>&
jobs
)
{
for
(
auto
it
=
jobs
.
begin
();
it
!=
jobs
.
end
();
++
it
)
{
(
*
it
)
->
positioningMethod
=
cta
::
PositioningMethod
::
ByBlock
;
...
...
@@ -101,8 +101,9 @@ void RecallTaskInjector::injectBulkRecalls(const std::vector<cta::RetrieveJob *>
m_lc
.
log
(
LOG_INFO
,
"Recall task created"
);
DiskWriteTask
*
dwt
=
new
DiskWriteTask
(
*
it
,
m_memManager
);
TapeReadTask
*
trt
=
new
TapeReadTask
(
*
it
,
*
dwt
,
m_memManager
);
cta
::
RetrieveJob
*
job
=
it
->
get
();
DiskWriteTask
*
dwt
=
new
DiskWriteTask
(
it
->
release
(),
m_memManager
);
TapeReadTask
*
trt
=
new
TapeReadTask
(
job
,
*
dwt
,
m_memManager
);
m_diskWriter
.
push
(
dwt
);
m_tapeReader
.
push
(
trt
);
...
...
@@ -116,7 +117,7 @@ void RecallTaskInjector::injectBulkRecalls(const std::vector<cta::RetrieveJob *>
//------------------------------------------------------------------------------
bool
RecallTaskInjector
::
synchronousInjection
()
{
std
::
vector
<
cta
::
RetrieveJob
*
>
jobs
;
std
::
vector
<
std
::
unique_ptr
<
cta
::
RetrieveJob
>
>
jobs
;
try
{
uint64_t
files
=
0
;
...
...
@@ -126,7 +127,7 @@ bool RecallTaskInjector::synchronousInjection()
if
(
!
job
.
get
())
break
;
files
++
;
bytes
+=
job
->
archiveFile
.
size
;
jobs
.
push
_back
(
job
.
release
());
jobs
.
emplace
_back
(
job
.
release
());
}
}
catch
(
castor
::
exception
::
Exception
&
ex
)
{
castor
::
log
::
ScopedParamContainer
scoped
(
m_lc
);
...
...
@@ -185,7 +186,7 @@ void RecallTaskInjector::WorkerThread::run()
break
;
}
m_parent
.
m_lc
.
log
(
LOG_DEBUG
,
"RecallJobInjector:run: about to call client interface"
);
std
::
vector
<
cta
::
RetrieveJob
*
>
jobs
;
std
::
vector
<
std
::
unique_ptr
<
cta
::
RetrieveJob
>
>
jobs
;
uint64_t
files
=
0
;
uint64_t
bytes
=
0
;
...
...
@@ -194,7 +195,7 @@ void RecallTaskInjector::WorkerThread::run()
if
(
!
job
.
get
())
break
;
files
++
;
bytes
+=
job
->
archiveFile
.
size
;
jobs
.
push
_back
(
job
.
release
());
jobs
.
emplace
_back
(
job
.
release
());
}
LogContext
::
ScopedParam
sp01
(
m_parent
.
m_lc
,
Param
(
"transactionId"
,
m_parent
.
m_retrieveMount
.
getMountTransactionId
()));
...
...
This diff is collapsed.
Click to expand it.
tapeserver/castor/tape/tapeserver/daemon/RecallTaskInjector.hpp
+
1
−
1
View file @
7d041c36
...
...
@@ -126,7 +126,7 @@ private:
* Create all the tape-read and write-disk tasks for set of files to retrieve
* @param jobs
*/
void
injectBulkRecalls
(
const
std
::
vector
<
cta
::
RetrieveJob
*
>&
jobs
);
void
injectBulkRecalls
(
std
::
vector
<
std
::
unique_ptr
<
cta
::
RetrieveJob
>
>&
jobs
);
/**
* A request of files to recall. We request EITHER
...
...
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