-
Notifications
You must be signed in to change notification settings - Fork 200
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
blockstore: store first received coding shred index in ErasureMeta #961
Conversation
25ad37b
to
26d3305
Compare
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #961 +/- ##
=========================================
- Coverage 81.9% 81.8% -0.1%
=========================================
Files 853 853
Lines 231797 231824 +27
=========================================
+ Hits 189845 189852 +7
- Misses 41952 41972 +20 |
@@ -125,9 +125,8 @@ pub struct ErasureMeta { | |||
set_index: u64, | |||
/// First coding index in the FEC set | |||
first_coding_index: u64, | |||
/// Size of shards in this erasure set | |||
#[serde(rename = "size")] | |||
__unused_size: usize, |
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.
I think it is safe to change type from usize
to u64
for consistency and fewer type-casts.
usize
is serialized as u64
anyways:
https://github.com/serde-rs/serde/blob/f6623a365/serde/src/ser/impls.rs#L28
) * blockstore: store first received coding shred index in ErasureMeta * pr feedback: use u64 instead of usize (cherry picked from commit f133697) # Conflicts: # ledger/src/blockstore_meta.rs
) * blockstore: store first received coding shred index in ErasureMeta * pr feedback: use u64 instead of usize (cherry picked from commit f133697) # Conflicts: # ledger/src/blockstore_meta.rs
…Meta (backport of #961) (#981) * blockstore: store first received coding shred index in ErasureMeta (#961) * blockstore: store first received coding shred index in ErasureMeta * pr feedback: use u64 instead of usize (cherry picked from commit f133697) # Conflicts: # ledger/src/blockstore_meta.rs * fix blockstore_meta conflict --------- Co-authored-by: Ashwin Sekar <ashwin@anza.xyz> Co-authored-by: Ashwin Sekar <ashwin@solana.com>
…Meta (backport of anza-xyz#961) (anza-xyz#981) * blockstore: store first received coding shred index in ErasureMeta (anza-xyz#961) * blockstore: store first received coding shred index in ErasureMeta * pr feedback: use u64 instead of usize (cherry picked from commit f133697) # Conflicts: # ledger/src/blockstore_meta.rs * fix blockstore_meta conflict --------- Co-authored-by: Ashwin Sekar <ashwin@anza.xyz> Co-authored-by: Ashwin Sekar <ashwin@solana.com>
Reuse the
__unused_size : usize
field inErasureMeta
to store the index of the first received coding shred for the FEC set.Split from #835
Contributes to solana-labs#34897