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

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

Merged
mergify[bot] merged 2 commits intov1.8from
mergify/bp/v1.8/pr-21775
Feb 3, 2022
Merged

uses Option<u64> for SlotMeta.last_index (backport #21775)#22915
mergify[bot] merged 2 commits intov1.8from
mergify/bp/v1.8/pr-21775

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify Bot commented Feb 3, 2022

This is an automatic backport of pull request #21775 done by Mergify.
Cherry-pick of e08139f has failed:

On branch mergify/bp/v1.8/pr-21775
Your branch is up to date with 'origin/v1.8'.

You are currently cherry-picking commit e08139f94.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   core/src/repair_generic_traversal.rs
	both modified:   ledger/src/blockstore.rs
	both modified:   ledger/src/blockstore_meta.rs

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


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)

# Conflicts:
#	core/src/repair_generic_traversal.rs
#	ledger/src/blockstore.rs
#	ledger/src/blockstore_meta.rs
@mergify mergify Bot added conflicts automerge Merge this Pull Request automatically once CI passes labels Feb 3, 2022
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Feb 3, 2022

automerge label removed due to a CI failure

@mergify mergify Bot removed the automerge Merge this Pull Request automatically once CI passes label Feb 3, 2022
@behzadnouri behzadnouri force-pushed the mergify/bp/v1.8/pr-21775 branch from 5a70828 to 0bb9a39 Compare February 3, 2022 18:49
@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 Feb 3, 2022
@mergify
Copy link
Copy Markdown
Contributor Author

mergify Bot commented Feb 3, 2022

automerge label removed due to a CI failure

@mergify mergify Bot added the automerge Merge this Pull Request automatically once CI passes label Feb 3, 2022
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 3, 2022

Codecov Report

Merging #22915 (0bb9a39) into v1.8 (6e46511) will increase coverage by 0.0%.
The diff coverage is 97.3%.

@@           Coverage Diff           @@
##             v1.8   #22915   +/-   ##
=======================================
  Coverage    81.6%    81.6%           
=======================================
  Files         464      464           
  Lines      131738   131741    +3     
=======================================
+ Hits       107566   107586   +20     
+ Misses      24172    24155   -17     

@mergify mergify Bot merged commit f32c33d into v1.8 Feb 3, 2022
@mergify mergify Bot deleted the mergify/bp/v1.8/pr-21775 branch February 3, 2022 20:48
@github-actions
Copy link
Copy Markdown
Contributor

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 Mar 30, 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 conflicts locked PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant