-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Run cleanup of expired DB file locks to background job #22865
Conversation
By analyzing the blame information on this pull request, we identified @icewind1991, @nickvergessen and @schiesbn to be potential reviewers |
Steps to reproduce:
|
* fixes #22819 The old way fired a DELETE statement on each destruction of the DBLockingProvider. Which could cause a lot of queries. It's enough to run this every 5 minutes in a background job, which in the end could result in file locks that exists 5 minutes longer - in the worst case and for not properly released locks. This makes the DB based locking a lot more performant and could result in a similar performance to the Redis based locking provider.
88cc157
to
138219d
Compare
👍 looks good |
If not critical I'd suggest we put this in 9.0.1. We're already running out of time and this fix looks like it could use more time for testing. |
Ah right, but you mentionned 8.2.3... not sure... |
@MorrisJobke are there many big known setups that use DB locking ? |
Currently it's only one, but 8.2.3 will be a release to which potential more instances will upgrade, because it is not a .0 or .1 release anymore. So we probably need a release note for this otherwise. |
as discussed. backport is important. 👍 |
ok, we'll try to bring this in after the backport is confirmed (reviewed) |
stable9: #22867 |
stable8.2: #22868 I tested both backports and they work just fine. I moved them in the next-maintenance milestone for now. If you feel comfortable with merging them for the 9.0 and 8.2.3 release feel free to do so. I would be more than happy 😃 |
Tested, works 👍 |
Run cleanup of expired DB file locks to background job
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The old way fired a DELETE statement on each destruction of the
DBLockingProvider. Which could cause a lot of queries. It's enough
to run this every 5 minutes in a background job, which in the end
could result in file locks that exists 5 minutes longer - in the
worst case and for not properly released locks.
This makes the DB based locking a lot more performant and could
result in a similar performance to the Redis based locking provider.
cc @LukasReschke @icewind1991 @PVince81 @karlitschek @DeepDiver1975 @rullzer
@karlitschek As discussed I would like to backport this to stable8.2 and stable9.
@cmonteroluque @karlitschek The best would be to have this in 8.2.3 and 9.0.0, but would be okay-ish for 8.2.4 and 9.0.1 too.