-
Notifications
You must be signed in to change notification settings - Fork 1.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
feat(sql): introduce global select query cache per interface #4525
Conversation
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.
it's looking good!
defaults are sane.
row-shifting while holding a row lock looks unusual, but I don't expect it to cause troubles in practice. in any case - please attach Clickbench numbers before merging it - just to be sure.
@jerrinot thanks for the review! |
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.
the concurrent cache is on critical path, there is no decent fuzz test for it and i don't think we have an abundance of concurrent query tests to exercise the cache fully
@bluestreak01 I've added an E2E stress test in 5c75de9 |
[PR Coverage check]😍 pass : 275 / 283 (97.17%) file detail
|
Swaps per-connection SELECT query caches with a global per-interface cache (HTTP/PGWire). The cache is a striped version of our existing thread-unsafe cache (
AssociativeCache
class). The goal is to make sure to utilize hash table stats introduced in #4517 even if the same query is run on different connections.Microbenchmarks
i7-1185G7 CPU (4c/8t), OpenJDK 17, Ubuntu 22.04:
Note: metrics on their own have a higher cost than the global cache in the contented case.