Skip to content

blockstore: store first received coding shred index in ErasureMeta#961

Merged
AshwinSekar merged 2 commits intoanza-xyz:masterfrom
AshwinSekar:erasure-meta-index
Apr 22, 2024
Merged

blockstore: store first received coding shred index in ErasureMeta#961
AshwinSekar merged 2 commits intoanza-xyz:masterfrom
AshwinSekar:erasure-meta-index

Conversation

@AshwinSekar
Copy link
Copy Markdown

Reuse the __unused_size : usize field in ErasureMeta to store the index of the first received coding shred for the FEC set.

Split from #835
Contributes to solana-labs#34897

@AshwinSekar AshwinSekar requested a review from behzadnouri April 22, 2024 15:00
@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 22, 2024

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-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 88.46154% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 81.8%. Comparing base (14d6c79) to head (bf5a23a).
Report is 15 commits behind head on master.

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     

Comment thread ledger/src/blockstore_meta.rs Outdated
first_coding_index: u64,
/// Size of shards in this erasure set
#[serde(rename = "size")]
__unused_size: usize,
Copy link
Copy Markdown

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

@AshwinSekar AshwinSekar merged commit f133697 into anza-xyz:master Apr 22, 2024
mergify Bot pushed a commit that referenced this pull request Apr 22, 2024
)

* 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
@AshwinSekar AshwinSekar deleted the erasure-meta-index branch April 22, 2024 23:23
AshwinSekar added a commit that referenced this pull request Apr 23, 2024
)

* 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
AshwinSekar added a commit that referenced this pull request Apr 23, 2024
…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>
anwayde pushed a commit to firedancer-io/agave that referenced this pull request Jul 23, 2024
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants