Skip to content
GitLab
Menu
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
25117449
Commit
25117449
authored
Nov 23, 2015
by
Eric Cano
Browse files
Added caching for information from archive job for logging after the object is potentially deleted.
parent
b068174b
Changes
2
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/tape/tapeserver/daemon/DiskReadTask.cpp
View file @
25117449
...
@@ -39,7 +39,10 @@ DiskReadTask::DiskReadTask(DataConsumer & destination,
...
@@ -39,7 +39,10 @@ DiskReadTask::DiskReadTask(DataConsumer & destination,
size_t
numberOfBlock
,
castor
::
server
::
AtomicFlag
&
errorFlag
)
:
size_t
numberOfBlock
,
castor
::
server
::
AtomicFlag
&
errorFlag
)
:
m_nextTask
(
destination
),
m_archiveJob
(
archiveJob
),
m_nextTask
(
destination
),
m_archiveJob
(
archiveJob
),
m_numberOfBlock
(
numberOfBlock
),
m_errorFlag
(
errorFlag
)
m_numberOfBlock
(
numberOfBlock
),
m_errorFlag
(
errorFlag
)
{}
{
m_archiveJobCachedInfo
.
remotePath
=
m_archiveJob
->
remotePathAndStatus
.
path
.
getRaw
();
m_archiveJobCachedInfo
.
fileId
=
m_archiveJob
->
archiveFile
.
fileId
;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// DiskReadTask::execute
// DiskReadTask::execute
...
@@ -208,8 +211,8 @@ void DiskReadTask::logWithStat(int level,const std::string& msg,log::LogContext&
...
@@ -208,8 +211,8 @@ void DiskReadTask::logWithStat(int level,const std::string& msg,log::LogContext&
m_stats
.
transferTime
?
1.0
*
m_stats
.
dataVolume
/
1000
/
1000
/
m_stats
.
transferTime
:
0
)
m_stats
.
transferTime
?
1.0
*
m_stats
.
dataVolume
/
1000
/
1000
/
m_stats
.
transferTime
:
0
)
.
add
(
"openRWCloseToTransferTimeRatio"
,
.
add
(
"openRWCloseToTransferTimeRatio"
,
m_stats
.
transferTime
?
(
m_stats
.
openingTime
+
m_stats
.
readWriteTime
+
m_stats
.
closingTime
)
/
m_stats
.
transferTime
:
0.0
)
m_stats
.
transferTime
?
(
m_stats
.
openingTime
+
m_stats
.
readWriteTime
+
m_stats
.
closingTime
)
/
m_stats
.
transferTime
:
0.0
)
.
add
(
"FILEID"
,
m_archiveJob
->
archiveFile
.
fileId
)
.
add
(
"FILEID"
,
m_archiveJob
CachedInfo
.
fileId
)
.
add
(
"path"
,
m_archiveJob
->
remotePathAndStatus
.
path
.
getRaw
()
);
.
add
(
"path"
,
m_archiveJob
CachedInfo
.
remotePath
);
lc
.
log
(
level
,
msg
);
lc
.
log
(
level
,
msg
);
}
}
...
...
tapeserver/castor/tape/tapeserver/daemon/DiskReadTask.hpp
View file @
25117449
...
@@ -97,6 +97,16 @@ private:
...
@@ -97,6 +97,16 @@ private:
*/
*/
cta
::
ArchiveJob
*
m_archiveJob
;
cta
::
ArchiveJob
*
m_archiveJob
;
/**
* Information about the archive job we will cache as it is needed
* after the archive job is going to be potentially deleted by the
* writer
*/
struct
{
std
::
string
remotePath
;
uint64_t
fileId
;
}
m_archiveJobCachedInfo
;
/**
/**
* The number of memory block we will need to read the whole file
* The number of memory block we will need to read the whole file
*/
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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