Commit b55fdb1c authored by Eric Cano's avatar Eric Cano
Browse files

Renamed members variables for clarity.

parent 9ab5ff9f
...@@ -186,7 +186,7 @@ namespace daemon { ...@@ -186,7 +186,7 @@ namespace daemon {
Request req = m_parent.m_queue.pop(); Request req = m_parent.m_queue.pop();
client::ClientProxy::RequestReport reqReport; client::ClientProxy::RequestReport reqReport;
std::auto_ptr<tapegateway::FilesToMigrateList> filesToMigrateList( std::auto_ptr<tapegateway::FilesToMigrateList> filesToMigrateList(
m_parent.m_client.getFilesToMigrate(req.nbMaxFiles, req.byteSizeThreshold,reqReport) m_parent.m_client.getFilesToMigrate(req.filesRequested, req.bytesRequested,reqReport)
); );
if(NULL==filesToMigrateList.get()){ if(NULL==filesToMigrateList.get()){
...@@ -211,12 +211,12 @@ namespace daemon { ...@@ -211,12 +211,12 @@ namespace daemon {
// Inject the tasks // Inject the tasks
m_parent.injectBulkMigrations(filesToMigrateList->filesToMigrate()); m_parent.injectBulkMigrations(filesToMigrateList->filesToMigrate());
// Decide on continuation // Decide on continuation
if(filesCount < req.nbMaxFiles / 2 && totalSize < req.byteSizeThreshold) { if(filesCount < req.filesRequested / 2 && totalSize < req.bytesRequested) {
// The client starts to dribble files at a low rate. Better finish // The client starts to dribble files at a low rate. Better finish
// the session now, so we get a clean batch on a later mount. // the session now, so we get a clean batch on a later mount.
log::ScopedParamContainer params(m_parent.m_lc); log::ScopedParamContainer params(m_parent.m_lc);
params.add("filesRequested", req.nbMaxFiles) params.add("filesRequested", req.filesRequested)
.add("bytesRequested", req.byteSizeThreshold) .add("bytesRequested", req.bytesRequested)
.add("filesReceived", filesCount) .add("filesReceived", filesCount)
.add("bytesReceived", totalSize); .add("bytesReceived", totalSize);
m_parent.m_lc.log(LOG_INFO, "Got less than half the requested work to do: triggering the end of session."); m_parent.m_lc.log(LOG_INFO, "Got less than half the requested work to do: triggering the end of session.");
......
...@@ -149,13 +149,13 @@ private: ...@@ -149,13 +149,13 @@ private:
class Request { class Request {
public: public:
Request(uint64_t mf, uint64_t mb, bool lc): Request(uint64_t mf, uint64_t mb, bool lc):
nbMaxFiles(mf), byteSizeThreshold(mb), lastCall(lc), end(false) {} filesRequested(mf), bytesRequested(mb), lastCall(lc), end(false) {}
Request(): Request():
nbMaxFiles(-1), byteSizeThreshold(-1), lastCall(true),end(true) {} filesRequested(-1), bytesRequested(-1), lastCall(true),end(true) {}
const uint64_t nbMaxFiles; const uint64_t filesRequested;
const uint64_t byteSizeThreshold; const uint64_t bytesRequested;
/** /**
* True if it is the last call for the set of requests :it means * True if it is the last call for the set of requests :it means
......
...@@ -213,7 +213,7 @@ void RecallTaskInjector::WorkerThread::run() ...@@ -213,7 +213,7 @@ void RecallTaskInjector::WorkerThread::run()
} }
m_parent.m_lc.log(LOG_DEBUG,"RecallJobInjector:run: about to call client interface"); m_parent.m_lc.log(LOG_DEBUG,"RecallJobInjector:run: about to call client interface");
client::ClientProxy::RequestReport reqReport; client::ClientProxy::RequestReport reqReport;
std::auto_ptr<tapegateway::FilesToRecallList> filesToRecallList(m_parent.m_client.getFilesToRecall(req.nbMaxFiles, req.byteSizeThreshold,reqReport)); std::auto_ptr<tapegateway::FilesToRecallList> filesToRecallList(m_parent.m_client.getFilesToRecall(req.filesRequested, req.bytesRequested,reqReport));
LogContext::ScopedParam sp01(m_parent.m_lc, Param("transactionId", reqReport.transactionId)); LogContext::ScopedParam sp01(m_parent.m_lc, Param("transactionId", reqReport.transactionId));
LogContext::ScopedParam sp02(m_parent.m_lc, Param("connectDuration", reqReport.connectDuration)); LogContext::ScopedParam sp02(m_parent.m_lc, Param("connectDuration", reqReport.connectDuration));
......
...@@ -63,15 +63,15 @@ public: ...@@ -63,15 +63,15 @@ public:
* @param diskWriter the one object that will hold all the threads which will be executing * @param diskWriter the one object that will hold all the threads which will be executing
* disk-writing tasks * disk-writing tasks
* @param client The one that will give us files to recall * @param client The one that will give us files to recall
* @param maxFiles maximal number of files we may request to the client at once * @param filesPerRequest number of files we request from the client at once
* @param byteSizeThreshold maximal number of cumulated byte * @param bytesPerRequest number of bytes we request from the client at once
* we may request to the client. at once * we may request to the client. at once
* @param lc copied because of the threading mechanism * @param lc copied because of the threading mechanism
*/ */
RecallTaskInjector(RecallMemoryManager & mm, RecallTaskInjector(RecallMemoryManager & mm,
TapeSingleThreadInterface<TapeReadTask> & tapeReader, TapeSingleThreadInterface<TapeReadTask> & tapeReader,
DiskWriteThreadPool & diskWriter,client::ClientInterface& client, DiskWriteThreadPool & diskWriter,client::ClientInterface& client,
uint64_t maxFiles, uint64_t byteSizeThreshold,castor::log::LogContext lc); uint64_t filesPerRequest, uint64_t bytesPerRequest,castor::log::LogContext lc);
virtual ~RecallTaskInjector(); virtual ~RecallTaskInjector();
...@@ -146,12 +146,12 @@ private: ...@@ -146,12 +146,12 @@ private:
class Request { class Request {
public: public:
Request(uint64_t mf, uint64_t mb, bool lc): Request(uint64_t mf, uint64_t mb, bool lc):
nbMaxFiles(mf), byteSizeThreshold(mb), lastCall(lc),end(false) {} filesRequested(mf), bytesRequested(mb), lastCall(lc),end(false) {}
Request(): Request():
nbMaxFiles(0), byteSizeThreshold(0), lastCall(true),end(true) {} filesRequested(0), bytesRequested(0), lastCall(true),end(true) {}
const uint64_t nbMaxFiles; const uint64_t filesRequested;
const uint64_t byteSizeThreshold; const uint64_t bytesRequested;
/** /**
* True if it is the last call for the set of requests :it means * True if it is the last call for the set of requests :it means
......
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