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

v1.17: Allow Blockstore to open unknown columns (backport of #34174) #34287

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Nov 30, 2023

This is an automatic backport of pull request #34174 done by Mergify.
Cherry-pick of 71c1782 has failed:

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

You are currently cherry-picking commit 71c1782c74.
  (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 <file>..." to mark resolution)
	both modified:   ledger/src/blockstore_db.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

As we develop new features or modifications, we occassionally need to
introduce new columns to the Blockstore. Adding a new column introduces
a compatibility break given that opening the database in Primary mode
(R/W access) requires opening all columns. Reverting to an old software
version that is unaware of the new column is obviously problematic.

In the past, we have addressed by backporting minimal "stub" PR's to
older versions. This is annoying, and only allow compatibility for the
single version or two that we backport to.

This PR adds a change to automatically detect all columns, and create
default column descriptors for columns we were unaware of. As a result,
older software versions can open a Blockstore that was modified by a
newer software version, even if that new version added columns that the
old version is unaware of.

(cherry picked from commit 71c1782)

# Conflicts:
#	ledger/src/blockstore_db.rs
@mergify mergify bot added the conflicts label Nov 30, 2023
@steviez
Copy link
Contributor

steviez commented Nov 30, 2023

I tested the initial PR, but as additional check, I had been running validator with tip of master and just switched it over to this branch. As expected, I see this log and things open just fine:

[2023-11-30T20:46:51.654401895Z INFO  solana_ledger::blockstore_db] Detected unknown column merkle_root_meta, opening column with basic options

Going to let it catch up / run for a while, and then switch back to tip of master

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #34287 (13ceb08) into v1.17 (a55711d) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Additional details and impacted files
@@           Coverage Diff           @@
##            v1.17   #34287   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         803      803           
  Lines      218021   218064   +43     
=======================================
+ Hits       178427   178476   +49     
+ Misses      39594    39588    -6     

Copy link
Contributor

@willhickey willhickey left a comment

Choose a reason for hiding this comment

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

:shipit:

@steviez
Copy link
Contributor

steviez commented Nov 30, 2023

Adding the original reviewers + Will to this.

I'd like to backport this PR to v1.17. It creates backwards compatibility when new columns are added to the Blockstore. The original PR stemmed from a new column getting added to master in what will become v1.18. There is some relevant discussion in #releng Discord channel starting from below when Ashwin proposed adding the new column:
https://discord.com/channels/428295358100013066/910937142182682656/1173668574095757402

Namely, we were previously going to backport "stub" column PR's to the release branches. But, PR provides a more general solution in that it can account for any new columns that are added.

Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

I am in favor of this backport, and the changes look correct to me

@steviez steviez merged commit fca44b7 into v1.17 Nov 30, 2023
31 checks passed
@steviez steviez deleted the mergify/bp/v1.17/pr-34174 branch November 30, 2023 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants