Skip to content
Snippets Groups Projects
Commit 5769eaaa authored by Eric Cano's avatar Eric Cano
Browse files

Fixed sheduling bug where not enough retrieve mounts got triggered.

The queue size division by the number of existing mount is only valid for archive mounts
where the queue is shared by each mount. In the case of retrieves, the criteria should be considered
vid by vid and the number of exiting mounts should not matter.
parent 716c46eb
Branches
Tags
No related merge requests found
......@@ -473,10 +473,13 @@ std::unique_ptr<TapeMount> Scheduler::getNextMount(const std::string &logicalLib
} catch (std::out_of_range &) {
existingMounts = 0;
}
uint32_t effectiveExistingMounts = 0;
if (m->type == common::dataStructures::MountType::Archive) effectiveExistingMounts = existingMounts;
bool mountPassesACriteria = false;
if (m->bytesQueued / (1 + existingMounts) >= m_minBytesToWarrantAMount)
if (m->bytesQueued / (1 + effectiveExistingMounts) >= m_minBytesToWarrantAMount)
mountPassesACriteria = true;
if (m->filesQueued / (1 + existingMounts) >= m_minFilesToWarrantAMount)
if (m->filesQueued / (1 + effectiveExistingMounts) >= m_minFilesToWarrantAMount)
mountPassesACriteria = true;
if (!existingMounts && ((time(NULL) - m->oldestJobStartTime) > m->minArchiveRequestAge))
mountPassesACriteria = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment