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

Change SlotMeta is_connected bool to bitflags (backport #29001) #29021

Merged
merged 2 commits into from
Dec 1, 2022

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 1, 2022

This is an automatic backport of pull request #29001 done by Mergify.
Cherry-pick of 01cd55a has failed:

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

You are currently cherry-picking commit 01cd55a27.
  (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)

Changes to be committed:
	modified:   ledger/src/blockstore_meta.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   ledger/src/blockstore.rs

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

We currently use the is_connected field to be able to signal to
ReplayStage that a slot has replayable updates. It was discovered that
this functionality is effectively broken, and that is_connected is never
true. In order to convey this information to ReplayStage more
effectively, we need extra state information so this PR changes the
existing bool to bitflags with two bits.

From a compatibility standpoint, the is_connected bool was already
occupying one byte in the serialized SlotMeta in blockstore. Thus, the
change from a bool to bitflags still "fits" in that one byte allotment.

In consideration of a case where a client may wish to downgrade software
and use the same ledger, deserializing the bitflags into a bool could
fail if the new bit is set. As such, this PR introduces the second bit
field, but does not set it anywhere. Once clusters have mass adopted a
software version with this PR, a subsequent change to actually set and
use the new field can be introduced.

(cherry picked from commit 01cd55a)

# Conflicts:
#	ledger/src/blockstore.rs
@mergify mergify bot added the conflicts label Dec 1, 2022
@mergify mergify bot assigned steviez Dec 1, 2022
@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 1, 2022
@mergify
Copy link
Contributor Author

mergify bot commented Dec 1, 2022

automerge label removed due to a CI failure

@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Dec 1, 2022
@steviez steviez force-pushed the mergify/bp/v1.14/pr-29001 branch from 10a208d to 9b190cd Compare December 1, 2022 21:11
@solana-grimes solana-grimes removed the automerge Merge this Pull Request automatically once CI passes label Dec 1, 2022
@solana-grimes
Copy link
Contributor

😱 New commits were pushed while the automerge label was present.

@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 1, 2022
@mergify
Copy link
Contributor Author

mergify bot commented Dec 1, 2022

automerge label removed due to a CI failure

@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Dec 1, 2022
@mergify mergify bot merged commit 2260239 into v1.14 Dec 1, 2022
@mergify mergify bot deleted the mergify/bp/v1.14/pr-29001 branch December 1, 2022 23:26
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants