Closed fengjiachun closed 4 days ago
The provided changes streamline logging, refactor code for better readability and efficiency, and make structural modifications in the Datanode and HeartbeatTask implementations across various files. Additionally, a workspace entry is added in the Cargo.toml, and asynchronous behavior in region disk usage is removed for performance enhancements.
Files | Change Summary |
---|---|
src/datanode/src/datanode.rs | Removed an await statement after calling close() on heartbeat_task . |
src/datanode/src/heartbeat.rs | Modified logging capitalization, refactored load_region_stats , added NodeInfo , and updated methods for HeartbeatTask . |
src/datanode/src/region_server.rs | Changed the signature of region_disk_usage to be synchronous by removing async . |
src/flow/Cargo.toml | Added a new workspace entry common-version.workspace . |
src/frontend/src/heartbeat.rs | Modified build_node_info to return Option<NodeInfo> and added create_heartbeat_request with new parameters and logic. |
sequenceDiagram
participant User
participant Datanode
participant HeartbeatTask
User->>Datanode: Initiates closing of heartbeat_task
Datanode->>HeartbeatTask: Sends close request without awaiting
Note right of Datanode: Improves performance
Note over HeartbeatTask: Start time tracking is added
HeartbeatTask->>HeartbeatTask: Initialize start_time_ms
Note over HeartbeatTask: Changed build_node_info to return Optional<NodeInfo>
HeartbeatTask->>HeartbeatTask: create_heartbeat_request(message, peer, start_time_ms)
Note right of HeartbeatTask: Handles new parameters and error handling
The Datanode is swift, responsive and bright,
Logging more clearly, through the endless night.
As heartbeats are tracked in a careful chase,
New fields added, for an accurate pace.
Region disk usage with no async delay,
Efficiency shines in the workflow today.
With Cargo workspace, all things in array.
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?
Attention: Patch coverage is 49.12281%
with 29 lines
in your changes missing coverage. Please review.
Project coverage is 84.57%. Comparing base (
b6585e3
) to head (5536258
). 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?
Checklist
Summary by CodeRabbit
New Features
Improvements
Refactor