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: avoid concurrent usage of AR models #16596

Merged
merged 2 commits into from May 2, 2022
Merged

FIX: avoid concurrent usage of AR models #16596

merged 2 commits into from May 2, 2022

Conversation

SamSaffron
Copy link
Member

Flagged by the truffle team at: https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671

This usage of AR is unsafe currently, as AR models are not safe for concurrent usage

Introduces a new query potentially every minute which should be acceptable.

Flagged by the truffle team at: https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671

This usage of AR is unsafe currently, as AR models are not safe for concurrent usage

Introduces a new query potentially every minute which should be acceptable.
@discoursebot
Copy link

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/thread-unsafe-current-user-usage-in-auth-defaultcurrentuserprovider/225671/2

Copy link
Contributor

@CvX CvX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update_ip_address! specs in spec/models/user_spec.rb need to be updated too

@SamSaffron
Copy link
Member Author

not sure we need to touch the spec, maybe add new, old instance based interface is untouched.

Copy link
Contributor

@CvX CvX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(frontend failures are unrelated)

@SamSaffron SamSaffron merged commit 616de83 into main May 2, 2022
@SamSaffron SamSaffron deleted the defer_safety branch May 2, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants