Closed fengjiachun closed 3 days ago
The meta-handler updates introduced ExtractStatHandler
and refined CollectStatsHandler
while removing PersistStatsHandler
. These changes enhanced data persistence, heartbeat processing, and cache management for statistics, aiming to improve stability and efficiency in the meta-service.
File(s) | Change Summary |
---|---|
src/meta-srv/src/handler.rs |
Added extract_stat_handler module; removed persist_stats_handler module; swapped handlers in test modules accordingly. |
src/meta-srv/src/handler/collect_stats_handler.rs |
Enhanced CollectStatsHandler with PutRequest , DashMap , and new EpochStats struct; improved heartbeat and cache management. |
src/meta-srv/src/handler/extract_stat_handler.rs |
Implemented ExtractStatHandler with HeartbeatHandler trait for validating roles and accumulating statistics from requests. |
src/meta-srv/src/metasrv/builder.rs |
Updated handler declarations in MetasrvBuilder : renamed and added new handlers such as ExtractStatHandler and CollectFlownodeClusterInfoHandler . |
Below is a sequence diagram demonstrating the updated heartbeat handling flow with the new CollectStatsHandler
and ExtractStatHandler
.
sequenceDiagram
participant Client
participant ExtractStatHandler
participant CollectStatsHandler
participant DataStore
Client->>+ExtractStatHandler: Send Heartbeat Request
ExtractStatHandler->>ExtractStatHandler: Validate Role
ExtractStatHandler->>+CollectStatsHandler: Forward Heartbeat Request
CollectStatsHandler->>CollectStatsHandler: Process Statistics
CollectStatsHandler->>DashMap: Update Cache
CollectStatsHandler->>DataStore: Persist Stats with PutRequest
CollectStatsHandler-->>-ExtractStatHandler: Acknowledge Receipt
ExtractStatHandler-->>-Client: Heartbeat Acknowledged
In the server's gentle heartbeat thrum, We gather stats, our work begun. Extracts and collects, a cadence bright, Ensuring data feels just right. 🐰✨ With code refined and caches deep, Our meta-service scales to keep.
[!TIP]
Early access features: enabled
We are currently testing the following features in early access: - **OpenAI `gpt-4o` model for code reviews and chat**: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available. Note: - You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file. - Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide feedback and report issues. - OSS projects are currently opted into early access features by default.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai Your summary is not accurate. For example, ExtractStatHandler was not newly introduced; I just renamed it.
@fengjiachun, thank you for pointing that out. Upon reviewing the git history and diffs, I can confirm that ExtractStatHandler
was indeed renamed and not newly introduced. I appreciate your clarification.
Attention: Patch coverage is 96.39175%
with 7 lines
in your changes missing coverage. Please review.
Project coverage is 84.59%. Comparing base (
ddc7a80
) to head (36ac0fe
). Report is 2 commits behind head on main.
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?
CollectFlownodeClusterInfoHandler
into the pipeline, which will result in the inability to collect the cluster info of flownodes (this part of information for flownodes has not been enabled yet).CollectStatsHandler
toExtractStatHandler
PersistStatsHandler
toCollectStatsHandler
Checklist
Summary by CodeRabbit
New Features
Bug Fixes
Refactor