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

Race when concurrently appending m2m association when preloaded model #534

Closed
wants to merge 4 commits into from

Conversation

YeahItsMeAgain
Copy link

Explain your user case and expected results

I tried appending to a m2m association inside a concurrent goroutines and for some reason it appended only some of the data.
While creating a minimal code example to test this i narrowed it down to this:

  • When the model is fetched from the db(previously created) & the associations are preloaded(Preload(clause.Associations)), it fails.
  • If any of this changes the test passes(note the comments in the code)

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.

1 participant