-
Notifications
You must be signed in to change notification settings - Fork 4
feature(collator): cumulative stats #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(collator): cumulative stats #636
Conversation
6e6ac52
to
a09a300
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feat/imp-sync-long-tail-version #636 +/- ##
===================================================================
+ Coverage 46.92% 47.90% +0.97%
===================================================================
Files 282 282
Lines 53857 54184 +327
Branches 53857 54184 +327
===================================================================
+ Hits 25273 25956 +683
+ Misses 27276 26904 -372
- Partials 1308 1324 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
feeca61
to
1cb403c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements cumulative statistics for the collator component, refactoring statistics-related methods from load_statistics to load_diff_statistics and introducing a cumulative aggregation mechanism. Key changes include adding support for per-partition and overall statistics aggregation, removing the redundant min_message field from StatKey serialization/deserialization, and updating tests and adapter methods to use the new APIs.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
storage/src/store/internal_queue/snapshot.rs | Updates iterator bounds and API signatures for diff-based stats collection. |
storage/src/store/internal_queue/model.rs | Removes the unused min_message field from StatKey. |
collator/* | Updates tests, adapter, and state logic to use load_diff_statistics and incorporate cumulative statistics. |
block-util/src/queue/proto.rs | Adjusts QueueKey update logic when new_lt reaches its maximum. |
collator/src/collator/do_collate/mod.rs | Adds new cumulative statistics parameters and introduces a panic on unsupported PrevBlockRef variant. |
Comments suppressed due to low confidence (1)
storage/src/store/internal_queue/snapshot.rs:175
- The change to use only the prefix slice ([..StatKey::PREFIX_SIZE]) for setting the lower bound may narrow the iterator range more than intended. Please verify that this behavior correctly captures all required keys compared to using the full byte sequence.
read_config.set_iterate_lower_bound(&from_bytes[..StatKey::PREFIX_SIZE]);
83d2222
to
055f621
Compare
4118d3b
to
859ade1
Compare
d5dc474
to
34c319e
Compare
…tatistics as a cached result
+ move `next_value` to `QueueAdapter`
…n McData * we need this to weed the cumulative stats in a proper way - each partition filtered by related processed_to info
d0f5ff7
to
71f3c67
Compare
* do not open new reader range when ranges limit reached in any partitions * remove collected ranges only when all ranges collected in all partitions * reduce cumulative remaining stats only by open ranges that above processed_to
046c550
into
feat/imp-sync-long-tail-version
No description provided.