-
Notifications
You must be signed in to change notification settings - Fork 10.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
Implement Redis distributed cache without Lua #54689
Conversation
/asp run |
This reverts commit 670a62e.
2. add async expiration tests (different code path needs exercise)
ef5512b
to
77453f1
Compare
(rebased in a wild attempt to fix the E2E failures) |
I'm concerned that simply enabling and depending on client side pipelining is going to lose atomicity guarantee for multi-threaded cache servers like garnet and dragonfly. Just because the commands are pipelined doesn't guarantee they execute as a transaction in the server side. It needs to be written as multi/exec. |
@badrishc if you feel strongly that but ... just sayin' ... if Garnet happened to implement a custom command that was the logical equivalent of the hypothetical consider:
that was a server-side equivalent of
However, I won't hold my breath on that... |
Per our discussion, it seems fine to go ahead with your solution. Would rather avoid multi/exec if customers aren't asking for the atomicity. Thanks. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@mgravell |
@EngRajabi we can cross that bridge trivially if we get to it; today: there would be zero differences other than "don't use Lua", which this PR harmonizes for both. We also have the ability to use server-detection in here to pick and choose features - we used to do that to choose Our hands are already: fully open. |
Implement Redis distributed cache without Lua
Resolves #54685
This uses the same logic, but moves the logic from Lua to pipelined regular Redis commands - the same commands. This is more efficient, and avoids problems when the server is not Lua-capable.
Note that the pipeline code needs some commentary:
Task.WhenAll
Additional changes:
The tests are not "live" in CI, but work locally:
(tests take this long because of the problems of using an external database for expiration)