Commit 617acd73 authored by Eric Cano's avatar Eric Cano
Browse files

Fixed wrong limits passed to archiveMount.getNextJobBatch().

Also added extra logs in ArchiveMount::getNextJobBatch().
parent 9c04f3ef
......@@ -1721,6 +1721,13 @@ std::list<std::unique_ptr<SchedulerDatabase::ArchiveJob> > OStoreDB::ArchiveMoun
std::list<std::unique_ptr<OStoreDB::ArchiveJob>> privateRet;
uint64_t currentBytes=0;
uint64_t currentFiles=0;
log::ScopedParamContainer params(logContext);
params.add("tapepool", mountInfo.tapePool)
.add("queueObject", aq.getAddressIfSet())
.add("queueSize", aq.dumpJobs().size());
logContext.log(log::INFO, "In ArchiveMount::getNextJobBatch(): archive queue found.");
while (aq.dumpJobs().size()) {
// We should build the list of jobs we intend to grab. We will attempt to
// dequeue them in one go, updating jobs in parallel. If some jobs turn out
......@@ -1738,6 +1745,17 @@ std::list<std::unique_ptr<SchedulerDatabase::ArchiveJob> > OStoreDB::ArchiveMoun
candidateJobs.emplace_back(new OStoreDB::ArchiveJob(job.address, m_objectStore, m_agentReference, *this));
candidateJobs.back()->tapeFile.copyNb = job.copyNb;
log::ScopedParamContainer params(logContext);
params.add("tapepool", mountInfo.tapePool)
.add("queueObject", aq.getAddressIfSet())
.add("candidatesCount", candidateJobs.size())
.add("currentFiles", currentFiles)
.add("currentBytes", currentBytes)
.add("requestedFiles", filesRequested)
.add("requestedBytes", bytesRequested);
logContext.log(log::INFO, "In ArchiveMount::getNextJobBatch(): will process a set of candidate jobs.");
// We now have a batch of jobs to try and dequeue. Should not be empty.
// First add the jobs to the owned list of the agent.
std::list<std::string> addedJobs;
......@@ -158,7 +158,7 @@ namespace daemon {
throw castor::tape::tapeserver::daemon::ErrorFlag();
Request req = m_parent.m_queue.pop();
auto jobs = m_parent.m_archiveMount.getNextJobBatch(req.filesRequested, req.filesRequested, m_parent.m_lc);
auto jobs = m_parent.m_archiveMount.getNextJobBatch(req.filesRequested, req.bytesRequested, m_parent.m_lc);
uint64_t files=jobs.size();
uint64_t bytes=0;
for (auto & j:jobs) bytes+=j->archiveFile.fileSize;
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