Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object stores don't participate in transactions #40

Open
nic-hartley opened this issue Nov 18, 2018 · 0 comments
Open

Object stores don't participate in transactions #40

nic-hartley opened this issue Nov 18, 2018 · 0 comments
Labels
bug Something isn't working discussion wanted We need to talk about this

Comments

@nic-hartley
Copy link
Member

Description

When an operation involving uploading or deleting images fails midway through, the database transaction is correctly rolled back, but S3 is left in an awkward intermediate state.

To Reproduce

  1. Create an exhibit with several artifacts (POST /exhibit)
  2. Edit that exhibit (POST /exhibit/{id})
  3. Make the exhibit fail at some point partway through (e.g. by stopping the database, or referencing a nonexistent artifact)

Expected behavior

Everything should be reverted back to how it was before the transaction

Actual behavior

"Random" artifacts will have their S3-linked images removed

Additional context

S3 doesn't actually have transaction support, so this will definitely be a challenge. We might end up having to get rid of the bulk exhibit-editing (images in S3 that aren't referenced don't hurt anything, and can be cleaned up easily; prematurely deleted images are no longer available and cause issues). We might also be able to rig something up with S3's versioning.

@nic-hartley nic-hartley added bug Something isn't working discussion wanted We need to talk about this labels Nov 18, 2018
@nic-hartley nic-hartley added this to the Public Production milestone Nov 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discussion wanted We need to talk about this
Projects
None yet
Development

No branches or pull requests

1 participant