Commit 7781d3ef authored by Eric Cano's avatar Eric Cano
Browse files

#450: Removed function which is now included in SchedulerDatabase::getNextRepackReportBatch().

parent fccc6c2d
...@@ -3850,32 +3850,4 @@ void OStoreDB::RetrieveJob::asyncSetSuccessful() { ...@@ -3850,32 +3850,4 @@ void OStoreDB::RetrieveJob::asyncSetSuccessful() {
} }
} }
//------------------------------------------------------------------------------
// OStoreDB::getNextSucceededRetrieveRequestForRepackBatch()
//------------------------------------------------------------------------------
std::list<std::unique_ptr<cta::objectstore::RetrieveRequest>> OStoreDB::getNextRetrieveRequestToReportToRepackForSuccessBatch(uint64_t filesRequested, log::LogContext& lc)
{
std::list<std::unique_ptr<cta::objectstore::RetrieveRequest>> ret;
typedef objectstore::ContainerAlgorithms<RetrieveQueue,RetrieveQueueToReportToRepackForSuccess> Carqtrtrfs;
Carqtrtrfs algo(this->m_objectStore, *m_agentReference);
// Decide from which queue we are going to pop.
RootEntry re(m_objectStore);
re.fetchNoLock();
while(true) {
auto queueList = re.dumpRetrieveQueues(JobQueueType::JobsToReportToRepackForSuccess);
if (queueList.empty()) return ret;
// Try to get jobs from the first queue. If it is empty, it will be trimmed, so we can go for another round.
Carqtrtrfs::PopCriteria criteria;
criteria.files = filesRequested;
auto jobs = algo.popNextBatch(queueList.front().vid, criteria, lc);
if(jobs.elements.empty()) continue;
for(auto &j : jobs.elements)
{
ret.emplace_back(std::move(j.retrieveRequest));
}
return ret;
}
}
} // namespace cta } // namespace cta
...@@ -319,14 +319,6 @@ public: ...@@ -319,14 +319,6 @@ public:
log::TimingList & timingList, utils::Timer & t, log::LogContext & lc) override; log::TimingList & timingList, utils::Timer & t, log::LogContext & lc) override;
std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob>> getNextRetrieveJobsFailedBatch(uint64_t filesRequested, log::LogContext &logContext) override; std::list<std::unique_ptr<SchedulerDatabase::RetrieveJob>> getNextRetrieveJobsFailedBatch(uint64_t filesRequested, log::LogContext &logContext) override;
/**
* Return the list of all RetrieveRequests that are in the RetrieveQueueToReportToRepackForSuccess
* @param filesRequested : The number of files we would like to return
* @param lc
* @return The list of all RetrieveRequests that are queued in the RetrieveQueueToReportToRepackForSuccess
*/
std::list<std::unique_ptr<cta::objectstore::RetrieveRequest>> getNextRetrieveRequestToReportToRepackForSuccessBatch(uint64_t filesRequested, log::LogContext& lc) override;
JobsFailedSummary getRetrieveJobsFailedSummary(log::LogContext &logContext) override; JobsFailedSummary getRetrieveJobsFailedSummary(log::LogContext &logContext) override;
......
...@@ -154,10 +154,6 @@ public: ...@@ -154,10 +154,6 @@ public:
return m_OStoreDB.getNextRetrieveJobsFailedBatch(filesRequested, lc); return m_OStoreDB.getNextRetrieveJobsFailedBatch(filesRequested, lc);
} }
std::list<std::unique_ptr<cta::objectstore::RetrieveRequest>> getNextRetrieveRequestToReportToRepackForSuccessBatch(uint64_t filesRequested, log::LogContext& lc) override {
return m_OStoreDB.getNextRetrieveRequestToReportToRepackForSuccessBatch(filesRequested,lc);
}
std::unique_ptr<RepackReportBatch> getNextRepackReportBatch(log::LogContext& lc) override { std::unique_ptr<RepackReportBatch> getNextRepackReportBatch(log::LogContext& lc) override {
return m_OStoreDB.getNextRepackReportBatch(lc); return m_OStoreDB.getNextRepackReportBatch(lc);
} }
......
...@@ -461,14 +461,6 @@ public: ...@@ -461,14 +461,6 @@ public:
*/ */
virtual std::list<std::unique_ptr<RetrieveJob>> getNextRetrieveJobsToReportBatch(uint64_t filesRequested, log::LogContext &logContext) = 0; virtual std::list<std::unique_ptr<RetrieveJob>> getNextRetrieveJobsToReportBatch(uint64_t filesRequested, log::LogContext &logContext) = 0;
virtual std::list<std::unique_ptr<RetrieveJob>> getNextRetrieveJobsFailedBatch(uint64_t filesRequested, log::LogContext &logContext) = 0; virtual std::list<std::unique_ptr<RetrieveJob>> getNextRetrieveJobsFailedBatch(uint64_t filesRequested, log::LogContext &logContext) = 0;
/**
* Return the list of all RetrieveRequests that are in the RetrieveQueueToReportToRepackForSuccess
* @param filesRequested : The number of files we would like to return
* @param lc
* @return The list of all RetrieveRequests that are queued in the RetrieveQueueToReportToRepackForSuccess
*/
virtual std::list<std::unique_ptr<cta::objectstore::RetrieveRequest>> getNextRetrieveRequestToReportToRepackForSuccessBatch(uint64_t filesRequested, log::LogContext& logContext) = 0;
/** /**
* A base class handling the various types of reports to repack. Implementation if left to Db implementer. * A base class handling the various types of reports to repack. Implementation if left to Db implementer.
......
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