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

Fix race condition when adding posts to favgroups #3403

Merged
merged 1 commit into from Dec 13, 2017

Conversation

evazion
Copy link
Member

@evazion evazion commented Nov 26, 2017

Fixes a race condition when adding posts to favgroups. If you tried to add posts to a favgroup very quickly using a script, some posts wouldn't get added. Adding a post to a favgroup was non-atomic, so some updates would clobber others.

This is the same bug as the pool bug from #3091 (fixed in 31b58e1).

Adding or removing a post id to a favgroup's post_ids string is
non-atomic. Lock it to prevent simultaneous updates to the same favgroup
from clobbering each other.

Same bug as danbooru#3091.
@r888888888 r888888888 merged commit 8d5f1bc into danbooru:master Dec 13, 2017
@evazion evazion deleted the fix-favgroup-race branch December 18, 2017 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants