AtlasOfLivingAustralia / doi-service

ALA DOI minting service - integrates with ANDS to produce the DOI, provides a landing page, and stores the associated file
https://doi.ala.org.au/
0 stars 4 forks source link

File storage should participate in transaction rollback #24

Closed sbearcsiro closed 12 months ago

sbearcsiro commented 6 years ago

If a DOI mint fails, eg for a providerMetadata validation exception then the DB record is rolled back, however, the file upload may have completed successfully. In the case of S3 this will leave orphaned objects which may cost money to host but be inaccessible. In these cases (for both mint and update operations), the file change needs to be registered in the transaction context somehow (or tracked manually) and on a rollback the uploaded file should be removed.

adam-collins commented 12 months ago

moving into https://github.com/AtlasOfLivingAustralia/doi-service/issues/91