Commit e1ca79f2 authored by Eric Cano's avatar Eric Cano
Browse files

Removed leftover from previous architecture.

parent c24a1d8f
......@@ -617,34 +617,6 @@ void OStoreDB::queueArchive(const std::string &instanceName, const cta::common::
logContext.log(log::INFO, "In OStoreDB::queueArchive(): recorded request for queueing (enqueueing posted to thread pool).");
}
//------------------------------------------------------------------------------
// OStoreDB::ArchiveToFileRequestCancelation::complete()
//------------------------------------------------------------------------------
void OStoreDB::ArchiveToFileRequestCancelation::complete(log::LogContext & lc) {
if (m_closed)
throw ArchiveRequestAlreadyDeleted("OStoreDB::ArchiveToFileRequestCancelation::complete(): called twice");
// We just need to delete the object and forget it
m_request.remove();
log::ScopedParamContainer params(lc);
params.add("archiveRequestObject", m_request.getAddressIfSet());
lc.log(log::INFO, "In ArchiveToFileRequestCancelation::complete(): removed archive request.");
m_agentReference.removeFromOwnership(m_request.getAddressIfSet(), m_objectStore);
m_closed = true;
}
//------------------------------------------------------------------------------
// OStoreDB::ArchiveToFileRequestCancelation::~ArchiveToFileRequestCancelation()
//------------------------------------------------------------------------------
OStoreDB::ArchiveToFileRequestCancelation::~ArchiveToFileRequestCancelation() {
if (!m_closed) {
try {
log::LogContext lc(m_logger);
m_request.garbageCollect(m_agentReference.getAgentAddress(), m_agentReference, lc, m_catalogue);
m_agentReference.removeFromOwnership(m_request.getAddressIfSet(), m_objectStore);
} catch (...) {}
}
}
//------------------------------------------------------------------------------
// OStoreDB::getArchiveJobs()
//------------------------------------------------------------------------------
......
......@@ -233,26 +233,6 @@ public:
void queueArchive(const std::string &instanceName, const cta::common::dataStructures::ArchiveRequest &request,
const cta::common::dataStructures::ArchiveFileQueueCriteriaAndFileId &criteria, log::LogContext &logContext) override;
CTA_GENERATE_EXCEPTION_CLASS(ArchiveRequestAlreadyDeleted);
class ArchiveToFileRequestCancelation:
public SchedulerDatabase::ArchiveToFileRequestCancelation {
public:
ArchiveToFileRequestCancelation(objectstore::AgentReference & agentReference,
objectstore::Backend & be, catalogue::Catalogue & catalogue, log::Logger &logger): m_request(be), m_lock(), m_objectStore(be),
m_catalogue(catalogue), m_logger(logger), m_agentReference(agentReference), m_closed(false) {}
virtual ~ArchiveToFileRequestCancelation();
void complete(log::LogContext & lc) override;
private:
objectstore::ArchiveRequest m_request;
objectstore::ScopedExclusiveLock m_lock;
objectstore::Backend & m_objectStore;
catalogue::Catalogue & m_catalogue;
log::Logger & m_logger;
objectstore::AgentReference &m_agentReference;
bool m_closed;
friend class OStoreDB;
};
std::map<std::string, std::list<common::dataStructures::ArchiveJob>> getArchiveJobs() const override;
......
......@@ -131,21 +131,6 @@ public:
*/
virtual std::list<cta::common::dataStructures::ArchiveJob> getArchiveJobs(
const std::string &tapePoolName) const = 0;
/*
* Subclass allowing the tracking and automated cleanup of a
* ArchiveToFile requests on the SchdulerDB for deletion.
* This will mark the request as to be deleted, and then add it to the agent's
* list. In a second step, the request will be completely deleted when calling
* the complete() method.
* In case of failure, the request will be queued to the orphaned requests queue,
* so that the scheduler picks it up later.
*/
class ArchiveToFileRequestCancelation {
public:
virtual void complete(log::LogContext & lc) = 0;
virtual ~ArchiveToFileRequestCancelation() {};
};
/*============ Archive management: tape server side =======================*/
/**
......
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