Closed WenyXu closed 1 week ago
The recent changes involve modifying the handling of Flownode
data throughout the codebase. The primary adjustment is transitioning from HashSet
to using Arc<HashMap>
, which accommodates more sophisticated data structures by including Peer
information. This alteration necessitated updates in several modules, including table_flownode
, create_flow
, instruction
, and others. Function signatures and logic were revised to work with the new data structure. Corresponding test cases were also updated.
Files | Change Summary |
---|---|
src/common/meta/src/cache/flow/table_flownode.rs |
Switched from HashSet to Arc<HashMap> for FlownodeSet , updated functions for new structure, and adjusted test cases. |
src/common/meta/src/ddl/create_flow.rs |
Replaced mapping of flownode_ids with flownode_peers and updated function implementations accordingly. |
src/common/meta/src/instruction.rs |
Changed from flownode_ids to flownodes vectors and included import for Peer . |
src/common/meta/src/key.rs |
Added TableFlowValue to the list of entities in the impl_table_meta_value! macro. |
src/common/meta/src/key/flow.rs |
Added import for TableFlowValue , modified build_create_txn methods, updated test data, adjusted assertions. |
src/common/meta/src/key/flow/flow_route.rs |
Updated key format in FlowRouteManager implementation. |
src/common/meta/src/key/flow/table_flow.rs |
Introduced serde serialization, added TableFlowValue struct, adjusted decoder , flows , and build_create_txn functions. |
src/operator/src/insert.rs |
Changed logic for retrieving and cloning values in Inserter implementation. |
🐰 In lines of code, a shift we see,
From sets to maps, we set them free.
Peers now join the nodes we flow,
A structure changed for them to show.
In tests and functions did we dive,
The code anew, now more alive!
With keys and tables, paths now new,
Together we, the bugs eschew. 🐰
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?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.69%. Comparing base (
ee9a5d7
) to head (ef19cc8
). Report is 4 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?
Storing peer info in
FlowTableValue
which reduce one query when mirror insertion.The original steps:
FlowId
sPeer
sChecklist
Summary by CodeRabbit
New Features
Bug Fixes
FlowRouteManager
to ensure accurate flow partition handling.Performance Improvements
HashSet
toArc<HashMap>
for flownode storage, which improves data handling efficiency.Developer Experience