Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

adds back ErasureMeta::first_coding_index field #21623

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

behzadnouri
Copy link
Contributor

Problem

#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a dedicated field to
represent.

Summary of Changes

  • added back ErasureMeta::first_coding_index.
  • some reworks around ErasureMeta construction and fec_set_index.

@codecov
Copy link

codecov bot commented Dec 6, 2021

Codecov Report

Merging #21623 (282f10d) into master (0224a8b) will decrease coverage by 0.1%.
The diff coverage is 89.8%.

@@            Coverage Diff            @@
##           master   #21623     +/-   ##
=========================================
- Coverage    81.6%    81.4%   -0.2%     
=========================================
  Files         511      511             
  Lines      143320   143440    +120     
=========================================
- Hits       116976   116856    -120     
- Misses      26344    26584    +240     

self.set_index..self.set_index + num_coding
// first_coding_index == 0 may imply that the field is not populated.
// self.set_index to be backward compatible.
// TODO remove this once cluster is upgraded to always populate
Copy link
Contributor

@carllin carllin Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to create an issue as a reminder to track this and other TODOs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, already have draft follow up changes.
There is no harm in keeping this code as is, until those upcoming changes are ready to go.
I just need to merge this commit in an earlier release to avoid any compatibility issues.

Comment on lines +281 to +285
let first_coding_index = if self.first_coding_index == 0 {
self.set_index
} else {
self.first_coding_index
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this was pretty subtle to maintain backwards compatibility

solana-labs#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a separate field to
represent.
@behzadnouri behzadnouri merged commit 49ba09b into solana-labs:master Dec 10, 2021
@behzadnouri behzadnouri deleted the first-coding-index branch December 10, 2021 20:08
mergify bot pushed a commit that referenced this pull request Dec 10, 2021
#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a separate field to
represent.

(cherry picked from commit 49ba09b)
mergify bot added a commit that referenced this pull request Dec 10, 2021
#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a separate field to
represent.

(cherry picked from commit 49ba09b)

Co-authored-by: behzad nouri <[email protected]>
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
mergify bot pushed a commit that referenced this pull request Feb 3, 2022
#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a separate field to
represent.

(cherry picked from commit 49ba09b)

# Conflicts:
#	ledger/src/blockstore.rs
mergify bot added a commit that referenced this pull request Feb 3, 2022
…2912)

* adds back ErasureMeta::first_coding_index field (#21623)

#16646
removed first_coding_index since the field is currently redundant and
always equal to fec_set_index.
However, with upcoming changes to erasure coding schema, this will no
longer be the same as fec_set_index and so requires a separate field to
represent.

(cherry picked from commit 49ba09b)

# Conflicts:
#	ledger/src/blockstore.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants