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

Fixed improper cleanup in OStoreDB::ArchiveJob::succeed().

parent e50c639a
No related branches found
No related tags found
No related merge requests found
......@@ -1331,11 +1331,19 @@ void OStoreDB::ArchiveJob::succeed() {
// Lock the request and set the job as successful.
objectstore::ScopedExclusiveLock atfrl(m_atfr);
m_atfr.fetch();
std::string atfrAddress = m_atfr.getAddressIfSet();
if (m_atfr.setJobSuccessful(m_copyNb)) {
m_atfr.remove();
} else {
m_atfr.commit();
}
// We no more own the job (which could be gone)
m_jobOwned = false;
// Remove ownership from agent
objectstore::ScopedExclusiveLock al(m_agent);
m_agent.fetch();
m_agent.removeFromOwnership(atfrAddress);
m_agent.commit();
}
OStoreDB::ArchiveJob::~ArchiveJob() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment