Commit 678e6390 authored by Steven Murray's avatar Steven Murray
Browse files

Added the castor configuration parameter TapeServer::TransferSessionTimer

parent c01f1721
......@@ -637,7 +637,12 @@
# The TCP/IP port on which ZMQ sockets will bind for internal communication
# between forked sessions and the parent tapeserverd process.
#TapeServer InternalPort 54322;
#TapeServer InternalPort 54322
# The delay in seconds the master process of the tapeserverd daemon should
# wait before launching another transfer session whilst the corresponding
# drive is idle.
#TapeServer TransferSessionTimer 10
## Tape Bridge Clients: dumptp, readtp and writetp #############################
......
......@@ -33,7 +33,8 @@ castor::tape::tapeserver::daemon::CatalogueConfig::CatalogueConfig() throw():
waitJobTimeoutSecs(0),
mountTimeoutSecs(0),
blockMoveTimeoutSecs(0),
vdqmDriveSyncIntervalSecs(0) {
vdqmDriveSyncIntervalSecs(0),
transferSessionTimerSecs(0) {
}
//------------------------------------------------------------------------------
......@@ -54,6 +55,8 @@ castor::tape::tapeserver::daemon::CatalogueConfig
"BlkMoveTimeout", TAPESERVER_BLKMOVETIMEOUT, log);
config.vdqmDriveSyncIntervalSecs = castorConf.getConfEntInt("TapeServer",
"VdqmDriveSyncInterval", TAPESERVER_VDQMDRIVESYNCINTERVAL, log);
config.transferSessionTimerSecs = castorConf.getConfEntInt("TapeServer",
"TransferSessionTimer", TAPESERVER_TRANSFERSESSION_TIMER, log);
return config;
}
......@@ -64,6 +64,12 @@ struct CatalogueConfig {
*/
time_t vdqmDriveSyncIntervalSecs;
/** The delay in seconds the master process of the tapeserverd daemon should
* wait before launching another transfer session whilst the corresponding
* drive is idle.
*/
time_t transferSessionTimerSecs;
/**
* Constructor that sets all integer member-variables to 0 and all string
* member-variables to the empty string.
......
......@@ -55,9 +55,7 @@ castor::tape::tapeserver::daemon::CatalogueDrive::CatalogueDrive(
m_config(config),
m_sysWrapper(sysWrapper),
m_state(state),
m_waitJobTimeoutSecs(catalogueConfig.waitJobTimeoutSecs),
m_mountTimeoutSecs(catalogueConfig.mountTimeoutSecs),
m_blockMoveTimeoutSecs(catalogueConfig.blockMoveTimeoutSecs),
m_catalogueConfig(catalogueConfig),
m_session(NULL) {
}
......@@ -430,7 +428,8 @@ void castor::tape::tapeserver::daemon::CatalogueDrive::
launchTransferSessionIfNecessary() {
// Simply return if it's too soon to launch a transfer session
if(10.0 > m_launchTransferSessionTimer.secs()) {
if((double)m_catalogueConfig.transferSessionTimerSecs >
m_launchTransferSessionTimer.secs()) {
return;
}
......@@ -445,9 +444,9 @@ void castor::tape::tapeserver::daemon::CatalogueDrive::
m_netTimeout,
m_config,
m_hostName,
m_waitJobTimeoutSecs,
m_mountTimeoutSecs,
m_blockMoveTimeoutSecs,
m_catalogueConfig.waitJobTimeoutSecs,
m_catalogueConfig.mountTimeoutSecs,
m_catalogueConfig.blockMoveTimeoutSecs,
m_processForker);
m_session = dynamic_cast<CatalogueSession *>(transferSession);
}
......
......@@ -349,23 +349,10 @@ private:
CatalogueDriveState m_state;
/**
* The maximum time in seconds that the data-transfer session can take to get
* the transfer job from the client.
* The CASTOR configuration parameters to be used by the catalogue.
*/
const time_t m_waitJobTimeoutSecs;
const CatalogueConfig m_catalogueConfig;
/**
* The maximum time in seconds that the data-transfer session can take to
* mount a tape.
*/
const time_t m_mountTimeoutSecs;
/**
* The maximum time in seconds that the data-transfer session can cease to
* move data blocks.
*/
const time_t m_blockMoveTimeoutSecs;
/**
* The session metadata associated to the drive catalogue entry
*/
......
......@@ -54,6 +54,13 @@ const unsigned short TAPESERVER_LABEL_PORT = 54321;
*/
const unsigned short TAPESERVER_INTERNAL_PORT = 54322;
/**
* The delay in seconds the master process of the tapeserverd daemon should
* wait before launching another transfer session whilst the corresponding
* drive is idle.
*/
const unsigned int TAPESERVER_TRANSFERSESSION_TIMER = 10;
/**
* The compile-time default value for the maximum time in seconds that the
* data-transfer session can take to get the transfer job from the client.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment