-
Notifications
You must be signed in to change notification settings - Fork 32
🎨Computational backend: stability improvements step8 🚨 #8401
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
🎨Computational backend: stability improvements step8 🚨 #8401
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8401 +/- ##
==========================================
- Coverage 87.90% 87.90% -0.01%
==========================================
Files 1951 1947 -4
Lines 75976 75966 -10
Branches 1336 1341 +5
==========================================
- Hits 66790 66775 -15
- Misses 8787 8790 +3
- Partials 399 401 +2
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
a676152 to
cd07876
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. Thanks!
70d806e to
ba2fd03
Compare
d2db947 to
c5d5b3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I undesrtand the idea but not totally the implementation. Pehrpas on friday you can spare a few minutes to clarify some doubts :-)
thx
packages/service-library/src/servicelib/redis/_semaphore_lua.py
Outdated
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!



What do these changes do?
What is fair queuing for a distributed semaphore
What this new implementation of the distributed semaphore does
redis-pylibrary which definesa so-called, This was removed as it is unnecesary, and generates weird unwanted issues, also not the defaultsocket timeoutof 30secondssocket timeoutin redis-py is not set, probably for this very reason,BRPOPRedis functionality is used. This is a blocking call that return the next element in one or multiple redis Key(s),holders_setkey and to a TTL-enabledholderkey,BRPOPfunction blocksLPUSHit back in the tokens list, Redis takes care of waking the next client waiting in line,socket timeoutis set it would timeout the waiting, therefore the client will lose its position in the waiting queue. That means issocket timeoutbecomes necessary it would reduce the fairness of that queue to the socket timeout window. Therefore it is currently removed to be perfectly fair.BEFORE vs AFTER:
Next steps
Related issue/s
How to test
especially check
test_semaphore.pyandtest_semaphore_decorator.pyDev-ops