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 {
Request req = m_parent.m_queue.pop();
client::ClientProxy::RequestReport reqReport;
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()){
......@@ -211,12 +211,12 @@ namespace daemon {
// Inject the tasks
m_parent.injectBulkMigrations(filesToMigrateList->filesToMigrate());
// 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 session now, so we get a clean batch on a later mount.
log::ScopedParamContainer params(m_parent.m_lc);
params.add("filesRequested", req.nbMaxFiles)
.add("bytesRequested", req.byteSizeThreshold)
params.add("filesRequested", req.filesRequested)
.add("bytesRequested", req.bytesRequested)
.add("filesReceived", filesCount)
.add("bytesReceived", totalSize);
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:
class Request {
public:
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():
nbMaxFiles(-1), byteSizeThreshold(-1), lastCall(true),end(true) {}
filesRequested(-1), bytesRequested(-1), lastCall(true),end(true) {}
const uint64_t nbMaxFiles;
const uint64_t byteSizeThreshold;
const uint64_t filesRequested;
const uint64_t bytesRequested;
/**
* True if it is the last call for the set of requests :it means
......
......@@ -213,7 +213,7 @@ void RecallTaskInjector::WorkerThread::run()
}
m_parent.m_lc.log(LOG_DEBUG,"RecallJobInjector:run: about to call client interface");
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 sp02(m_parent.m_lc, Param("connectDuration", reqReport.connectDuration));
......
......@@ -63,15 +63,15 @@ public:
* @param diskWriter the one object that will hold all the threads which will be executing
* disk-writing tasks
* @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 byteSizeThreshold maximal number of cumulated byte
* @param filesPerRequest number of files we request from the client at once
* @param bytesPerRequest number of bytes we request from the client at once
* we may request to the client. at once
* @param lc copied because of the threading mechanism
*/
RecallTaskInjector(RecallMemoryManager & mm,
TapeSingleThreadInterface<TapeReadTask> & tapeReader,
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();
......@@ -146,12 +146,12 @@ private:
class Request {
public:
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():
nbMaxFiles(0), byteSizeThreshold(0), lastCall(true),end(true) {}
const uint64_t nbMaxFiles;
const uint64_t byteSizeThreshold;
filesRequested(0), bytesRequested(0), lastCall(true),end(true) {}
const uint64_t filesRequested;
const uint64_t bytesRequested;
/**
* 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