External cache in redis for APQ and query planning#2024
Merged
Conversation
added 11 commits
October 3, 2022 15:29
just to see what will happen
Nearly working, but need more info about redis data types...
for testing purposes
to try it out
But, so are all the alternatives including: - arbitrary serialization - serde serialization - ... :(
Still hard... :(
This comment has been minimized.
This comment has been minimized.
added 15 commits
October 28, 2022 11:59
A tuple of Path and String cannot be used as a key in JSON, so we make a struxt that can be serialized directly to a string
the caller might soon rely on ranges and ordering, so we should let it decide how the key is serialized
4 tasks
BrynCooke
reviewed
Nov 4, 2022
| use serde::Serialize; | ||
| use tokio::sync::Mutex; | ||
|
|
||
| pub(crate) trait KeyType: |
Contributor
There was a problem hiding this comment.
Not seen this pattern before, nice :)
Contributor
Author
There was a problem hiding this comment.
I found that was cool too :)
Contributor
|
In general this seems like a good first step, and as per the comments there'll be some changes as we add more storage options later. |
bnjjj
reviewed
Nov 7, 2022
Contributor
Author
|
I think it's in a good shape now. Do we think things are missing to get it merged? What could be added after the merge (right now I'm thinking automatic reconnection to redis) |
Contributor
|
Let's go for merge |
BrynCooke
approved these changes
Nov 9, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implement caching in external storage for query plans, introspection and APQ. This is done as a multi level cache, first in memory with LRU then with a redis cluster backend. Since it is still experimental, it is opt-in through a Cargo feature