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

Transitory storage failure due to missing db transaction #126

Closed
fluffy-critter opened this Issue Sep 22, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@fluffy-critter
Collaborator

fluffy-critter commented Sep 22, 2018

Current Behavior

On the first render of an entry with a new image:

Error loading image woo-ghost.png{img_class="inset-right",shape=True} "a tightly-wrapped ghost!": Object Image[‘content/blog/woo-ghost.png’] cannot be stored in the database. IntegrityError: UNIQUE constraint failed: Image.file_path

Presumably a race condition happened where two threads scanned the same image at the same time, and the db transaction didn't do anything to prevent there from being two concurrent writes.

Probably a good idea to bring back the model.lock thing, since SQLite transactions have never been all that, well, transactional.

Steps to Reproduce (for bugs)

Transitory failure, only occurs on index scan and/or first render of an entry, so... kind of a low priority I guess? But I saw it in one of the RSS feeds.

@fluffy-critter fluffy-critter added the bug label Sep 22, 2018

fluffy-critter added a commit that referenced this issue Sep 22, 2018

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