Commit f2a55034 authored by Cedric Caffy's avatar Cedric Caffy
Browse files

RAO is now applied for every batches of Retrieve jobs

parent 34faad05
......@@ -795,7 +795,6 @@ TEST_P(DataTransferSessionTest, DataTransferSessionRAORecall) {
size_t archiveFileSize=sizeof(data);
castor::tape::SCSI::Structures::zeroStruct(&data);
int fseq;
bool isFirst = true;
for (fseq=1; fseq <= MAX_RECALLS ; fseq ++) {
// Create a path to a remote destination file
std::ostringstream remoteFilePath;
......@@ -859,17 +858,16 @@ TEST_P(DataTransferSessionTest, DataTransferSessionRAORecall) {
else if (MAX_BULK_RECALLS >= 30) {
if ((expectedOrder.size() % 30 == 0) ||
(fseq % MAX_RECALLS == 0) || (fseq % MAX_BULK_RECALLS == 0)) {
apply_rao = true & isFirst;
apply_rao = true;
add_expected = true;
}
}
else if ((fseq % MAX_BULK_RECALLS == 0) || (fseq % MAX_RECALLS == 0)) {
apply_rao = true & isFirst;
apply_rao = true;
add_expected = true;
}
if (apply_rao) {
std::reverse(expectedOrder.begin(), expectedOrder.end());
isFirst = false;
}
if (add_expected) {
std::stringstream expectedLogLine;
......
......@@ -315,7 +315,11 @@ void RecallTaskInjector::WorkerThread::run()
m_parent.synchronousFetch();
}
m_parent.injectBulkRecalls();
m_parent.m_useRAO = false;
/**
* Commenting this line as we want the RAO to be executed on
* all the batchs and not only one.
*/
//m_parent.m_useRAO = false;
}
catch (castor::tape::SCSI::Exception& e) {
m_parent.m_lc.log(cta::log::WARNING, "The drive does not support RAO: disabled");
......
......@@ -207,6 +207,21 @@ drive::deviceInfo drive::DriveMHVTL::getDeviceInfo() {
return devInfo;
}
SCSI::Structures::RAO::udsLimits drive::DriveMHVTL::getLimitUDS(){
SCSI::Structures::RAO::udsLimits lims;
//For MHVTL and for tests, assume that
//the max number of files for RAO supported by an MHVTL drive
//is 1000;
lims.maxSize = 1000;
lims.maxSupported = 1000;
return lims;
}
void drive::DriveMHVTL::queryRAO(std::list<SCSI::Structures::RAO::blockLims> &files, int maxSupported){
//The query RAO method of MHVTL drive returns nothing
//something could be implemented for testing...
}
/**
* Generic SCSI path, used for passing to external scripts.
* @return Path to the generic SCSI device file.
......
......@@ -564,6 +564,8 @@ namespace drive {
virtual std::map<std::string,uint32_t> getDriveStats();
virtual std::map<std::string,uint32_t> getVolumeStats();
virtual drive::deviceInfo getDeviceInfo();
virtual SCSI::Structures::RAO::udsLimits getLimitUDS();
virtual void queryRAO(std::list<SCSI::Structures::RAO::blockLims> &files, int maxSupported);
};
class DriveLTO : public DriveGeneric {
......
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