Skip to content
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

uses Option<u64> for SlotMeta.last_index (backport #21775) #21806

Merged
merged 1 commit into from
Dec 11, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 11, 2021

This is an automatic backport of pull request #21775 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

SlotMeta.last_index may be unknown and current code is using u64::MAX to
indicate that:
https://github.com/solana-labs/solana/blob/6c108c8fc/ledger/src/blockstore_meta.rs#L169-L174

This lacks type-safety and can introduce bugs if not always checked for
Several instances of slot_meta.last_index + 1 are also subject to
overflow.

This commit updates the type to Option<u64>. Backward compatibility is
maintained by customizing serde serialize/deserialize implementations.

(cherry picked from commit e08139f)
@mergify mergify bot added automerge Merge this Pull Request automatically once CI passes and removed automerge Merge this Pull Request automatically once CI passes labels Dec 11, 2021
@mergify
Copy link
Contributor Author

mergify bot commented Dec 11, 2021

automerge label removed due to a CI failure

@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Dec 11, 2021
@mergify mergify bot merged commit 9956afb into v1.9 Dec 11, 2021
@codecov
Copy link

codecov bot commented Dec 11, 2021

Codecov Report

Merging #21806 (65f443f) into v1.9 (87accd1) will decrease coverage by 0.3%.
The diff coverage is 67.5%.

@@            Coverage Diff            @@
##             v1.9   #21806     +/-   ##
=========================================
- Coverage    81.6%    81.3%   -0.4%     
=========================================
  Files         511      515      +4     
  Lines      143102   143586    +484     
=========================================
- Hits       116860   116772     -88     
- Misses      26242    26814    +572     

@mergify mergify bot deleted the mergify/bp/v1.9/pr-21775 branch December 11, 2021 17:39
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2022

This PR has been automatically locked since there has not been any activity in past 14 days after it was merged.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes locked PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant