feat(mito2): add partition range cache infrastructure#7798
feat(mito2): add partition range cache infrastructure#7798evenyag wants to merge 9 commits intoGreptimeTeam:mainfrom
Conversation
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request lays the foundational infrastructure for caching partition range scan results within the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the necessary infrastructure for caching partition range scan results in mito2. The changes are well-structured, adding a new cache to the CacheManager, defining cache keys and values in a new range_cache module, and implementing the logic for creating scan fingerprints. The code is consistent with existing patterns and includes comprehensive unit tests. I've found one minor issue regarding memory estimation for cache keys, which could lead to the cache using slightly more memory than its configured limit. Overall, this is a solid contribution that lays the groundwork for future performance improvements.
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
- Remove TimeSeriesDistribution from fingerprint as it only affects yield order - Disable range cache when dyn filters are present since they change at runtime Signed-off-by: evenyag <realevenyag@gmail.com>
Signed-off-by: evenyag <realevenyag@gmail.com>
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
This PR adds the infrastructure for partition range scan result caching in
mito2.The main changes are:
CacheManagerand expose it throughCacheStrategyread/range_cache.rsto define cache keys, request fingerprints, cached values, andmemory estimation
scan_region.rsfor cache-eligible readspartition_expr_versionHashforMergeModeso it can participate in cache keysThis branch is intentionally infrastructure-focused. It prepares the cache key model and cache
container, but it does not yet wire the scan execution path to actually read from or write to the
new range result cache.
PR Checklist
Please convert it to a draft if some of the following conditions are not met.