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

Fixed missing re-setting of owner in ArchiveRequest garbage collection.

parent a78a2000
No related branches found
No related tags found
No related merge requests found
......@@ -314,6 +314,7 @@ void ArchiveRequest::garbageCollect(const std::string &presumedOwner, AgentRefer
if (aq.addJobIfNecessary(jd, getAddressIfSet(), getArchiveFile().archiveFileID,
getArchiveFile().fileSize, getMountPolicy(), getEntryLog().time))
aq.commit();
j->set_owner(aq.getAddressIfSet());
j->set_status(serializers::AJS_PendingMount);
commit();
} catch (...) {
......@@ -338,6 +339,8 @@ void ArchiveRequest::garbageCollect(const std::string &presumedOwner, AgentRefer
if (aq.addOrphanedJobPendingNsCreation(jd, getAddressIfSet(),
m_payload.archivefileid(), m_payload.filesize()))
aq.commit();
j->set_owner(aq.getAddressIfSet());
commit();
} catch (...) {
j->set_status(serializers::AJS_Failed);
// This could be the end of the request, with various consequences.
......@@ -360,6 +363,7 @@ void ArchiveRequest::garbageCollect(const std::string &presumedOwner, AgentRefer
if (aq.addOrphanedJobPendingNsCreation(jd, getAddressIfSet(),
m_payload.archivefileid(), m_payload.filesize()))
aq.commit();
j->set_owner(aq.getAddressIfSet());
j->set_status(serializers::AJS_PendingMount);
commit();
} catch (...) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment