Skip to content

Archive outside transaction#12122

Open
qqmyers wants to merge 22 commits intoIQSS:developfrom
QualitativeDataRepository:Arch6-archive_outside_transaction
Open

Archive outside transaction#12122
qqmyers wants to merge 22 commits intoIQSS:developfrom
QualitativeDataRepository:Arch6-archive_outside_transaction

Conversation

@qqmyers
Copy link
Member

@qqmyers qqmyers commented Jan 28, 2026

What this PR does / why we need it: This PR updates the archiving commands so that, when triggered via the engine (execute method), they now create the OAI_ORE and DataCite xml files in a transaction (since the code needs to read the db), drop out of any transaction to do the potentially long process of creating the zipped bag, and then update the archival status on the datasetversion in a new transaction at the end.

It also includes a couple minor improvements:

  • the 'pending' status was the only one being written as text rather than as a json object ({"status":"pending"}). That's now fixed and a couple places where the status was being nulled instead of to pending have been updated
  • setting the number of threads for bagging has been changed to static and is now done before the BagGenerator object is created (the BagGenerator constructor needs to know the # of threads so the other order fails). This duplicates a change in OAI_ORE and Archival Bag updates #12063.

Which issue(s) this PR closes:

  • Closes #

Special notes for your reviewer:
FWIW: This is one of several PRs related to updates being done to improve archiving scalability at QDR and DANS. Some are relatively minor cleanup while others are more significant. I'm submitting them all to avoid drift in QDR's fork and to leverage QDR testing (where all of these are being tested together).

This builds on #12103

The changes for this specific PR are the ones on Jan 28 and the first one there has the basic overall change: The abstract command execute method now computes the ORE and DataCite XML values and passes them to the no transaction performArchivingAndPersist method which them calls the particular child class's refactored performArchiveSubmission method before finally calling persistResult in a new transaction to write the status to the datasetversion.

Suggestions on how to test this: Primarily regression testing to assure archiving still works. I don't know how easy it would be to see lower memory use or other impact of not having a long-running transaction or of that is worth the effort.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?: included

Additional documentation:

@qqmyers qqmyers changed the title Arch6 archive outside transaction Archive outside transaction Jan 28, 2026
@qqmyers qqmyers added GDCC: QDR of interest to QDR Size: 10 A percentage of a sprint. 7 hours. labels Jan 28, 2026
@qqmyers qqmyers added this to the 6.10 milestone Jan 28, 2026
@coveralls
Copy link

Coverage Status

coverage: 24.294% (-0.04%) from 24.336%
when pulling 236fca4 on QualitativeDataRepository:Arch6-archive_outside_transaction
into 9a5ca93 on IQSS:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GDCC: QDR of interest to QDR Size: 10 A percentage of a sprint. 7 hours.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants