-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
set_count_on_hand should use lock #2015
set_count_on_hand should use lock #2015
Conversation
This is the same pattern that was followed for adjust_count_on_hand to avoid deadlocks.
This new PR does cause the same test failure as #1101:
|
Like @peterberkenbosch originally reported, it's passing locally. |
Also worth noting this raises a new depreciation warning:
|
There are now a few of these warnings in core. See rails/rails#25873 for details.
I am unsure how to proceed because I believe we need to address the deprecation warnings generally and I cannot reproduce the CI test failure locally, even when running the full core suite with the same seed as CI. |
The local dummy test app uses sqlite as database, while CircleCI tests with posgresql. |
Could you remind me how to switch locally? Also of note, I do not get the depreciation notice locally, which may suggest something else is dirtying the stock item's state outside the spec? |
Not possible through |
I was able to follow the README and use Still passes locally against latest |
I wanted to clarify this a bit. After adding this change, there are new deprecation warnings when the full core spec suite runs. However it's not |
I was actually under the impression that I'm actually thinking that this |
Upon further reflection, I don't believe I can stand behind this PR. When it comes to addressing DB lock issues, I want to be confident I can reproduce and eliminate the deadlocks via a load test. Haphazardly adding locks, as @mtomov rightly suggests, is not the right path. Ideas for new issues:
Please let me know if there is interest in the issues above. |
This is the same pattern that was followed for adjust_count_on_hand to
avoid deadlocks.
Reopens #1101 to see if this will now pass on master.