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
dc3a0303
Commit
dc3a0303
authored
11 years ago
by
Steven Murray
Browse files
Options
Downloads
Patches
Plain Diff
bug #101907: The 55 second timeouts of tapebridged are not working
Fixed in the trunk.
parent
11118c1a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
castor/tape/tapebridge/BridgeSocketCatalogue.cpp
+5
-14
5 additions, 14 deletions
castor/tape/tapebridge/BridgeSocketCatalogue.cpp
castor/tape/tapebridge/BridgeSocketCatalogue.hpp
+0
-33
0 additions, 33 deletions
castor/tape/tapebridge/BridgeSocketCatalogue.hpp
with
5 additions
and
47 deletions
castor/tape/tapebridge/BridgeSocketCatalogue.cpp
+
5
−
14
View file @
dc3a0303
...
...
@@ -386,27 +386,22 @@ int castor::tape::tapebridge::BridgeSocketCatalogue::
void
castor
::
tape
::
tapebridge
::
BridgeSocketCatalogue
::
checkForTimeout
()
const
throw
(
castor
::
exception
::
TimeOut
)
{
if
(
!
m_clientReqHistory
.
empty
())
{
// If the "get more work" socket-descriptor has already been set
if
(
0
<=
m_getMoreWorkConnection
.
clientSock
)
{
// Get the current time
struct
timeval
now
=
{
0
,
0
};
gettimeofday
(
&
now
,
NULL
);
// Get the oldest client request
const
ClientReqHistoryElement
&
clientRequest
=
m_clientReqHistory
.
front
();
// Calculate the age in seconds
const
int
ageSecs
=
clientRequest
.
clientReqTimeStamp
.
tv_sec
-
now
.
tv_sec
;
const
int
ageSecs
=
now
.
tv_sec
-
m_getMoreWorkConnection
.
clientReqTimeStamp
.
tv_sec
;
// Throw an exception if the oldest client-request has been around too long
if
(
ageSecs
>
CLIENTNETRWTIMEOUT
)
{
castor
::
exception
::
TimeOut
te
;
te
.
getMessage
()
<<
"Timed out waiting for client reply"
": clientSock="
<<
clientRequest
.
clientSock
<<
": clientSock="
<<
m_getMoreWorkConnection
.
clientSock
<<
": ageSecs="
<<
ageSecs
<<
": clientNetRWTimeout="
<<
CLIENTNETRWTIMEOUT
;
...
...
@@ -530,10 +525,6 @@ void castor::tape::tapebridge::BridgeSocketCatalogue::
m_getMoreWorkConnection
.
clientSock
=
clientSock
;
m_getMoreWorkConnection
.
tapebridgeTransId
=
tapebridgeTransId
;
gettimeofday
(
&
(
m_getMoreWorkConnection
.
clientReqTimeStamp
),
NULL
);
// Store an entry in the client request history
m_clientReqHistory
.
push_back
(
ClientReqHistoryElement
(
clientSock
,
m_getMoreWorkConnection
.
clientReqTimeStamp
));
}
...
...
This diff is collapsed.
Click to expand it.
castor/tape/tapebridge/BridgeSocketCatalogue.hpp
+
0
−
33
View file @
dc3a0303
...
...
@@ -467,39 +467,6 @@ private:
*/
std
::
set
<
int
>
m_rtcpdIOControlConns
;
/**
* Information about a single client request to be used to create a history
* about sent and pending client requests.
*/
struct
ClientReqHistoryElement
{
const
int
clientSock
;
const
struct
timeval
clientReqTimeStamp
;
/**
* Constructor.
*/
ClientReqHistoryElement
(
const
int
cSock
,
const
struct
timeval
cReqTimeStamp
)
:
clientSock
(
cSock
),
clientReqTimeStamp
(
cReqTimeStamp
)
{
}
};
/**
* Type used to define a list of client request history elements.
*/
typedef
std
::
list
<
ClientReqHistoryElement
>
ClientReqHistoryList
;
/**
* The history of pending client requests implemented as a time-ordered FIFO,
* where the oldest request is at the front and the youngest at the back.
*
* This history is used to efficiently determine if an rtcpd-connection has
* timed out waiting for a reply from a client.
*/
ClientReqHistoryList
m_clientReqHistory
;
/**
* The pending client migration-report connection.
*/
...
...
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