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

Exclude stubbed ProgramCosts column from compaction #18840

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

CriesofCarrots
Copy link
Contributor

Problem

Booting a v1.6 node with an existing ledger fails on compaction:

thread '<unnamed>' panicked at 'not implemented', ledger/src/blockstore_db.rs:801:9

The code excluding the ProgramCosts column from compaction wasn't included in #18743 (fyi @taozhu-chicago )

Summary of Changes

Exclude stubbed ProgramCosts column from compaction

cc @joncinque

@CriesofCarrots CriesofCarrots requested a review from ryoqun July 22, 2021 16:16
@CriesofCarrots CriesofCarrots force-pushed the v1.6-compaction-filter branch from 67823a9 to baae46d Compare July 22, 2021 16:19
columns::TransactionStatusIndex::NAME
));
assert!(excludes_from_compaction(columns::ProgramCosts::NAME));
assert!(!excludes_from_compaction("something else"));
Copy link
Contributor

Choose a reason for hiding this comment

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

haha. :)

@ryoqun
Copy link
Contributor

ryoqun commented Jul 22, 2021

thread '<unnamed>' panicked at 'not implemented', ledger/src/blockstore_db.rs:801:9

I wish this could be type safe... but I'm glad that it crashed hard before rocksdb compaction go berserk, bricking existing ledgers...

Copy link
Contributor

@ryoqun ryoqun left a comment

Choose a reason for hiding this comment

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

lgtm!

@CriesofCarrots CriesofCarrots added the automerge Merge this Pull Request automatically once CI passes label Jul 22, 2021
@codecov
Copy link

codecov bot commented Jul 22, 2021

Codecov Report

Merging #18840 (baae46d) into v1.6 (00d1cb0) will decrease coverage by 0.3%.
The diff coverage is 70.7%.

@@            Coverage Diff            @@
##             v1.6   #18840     +/-   ##
=========================================
- Coverage    82.6%    82.2%   -0.4%     
=========================================
  Files         423      422      -1     
  Lines      116083   118029   +1946     
=========================================
+ Hits        95947    97104   +1157     
- Misses      20136    20925    +789     

@mergify mergify bot merged commit 8c28f9b into solana-labs:v1.6 Jul 22, 2021
CriesofCarrots added a commit to CriesofCarrots/solana that referenced this pull request Jul 26, 2021
CriesofCarrots added a commit that referenced this pull request Jul 26, 2021
* backport new column families from master to 1.6 (#18743)

* backporting bank_hash and program_costs column families from master to 1.6 for rocksdb backward compatibility

* missed a line to allow dead code

* include code for purge

* Exclude stubbed ProgramCosts column from compaction (#18840)

Co-authored-by: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com>
@CriesofCarrots CriesofCarrots deleted the v1.6-compaction-filter branch July 28, 2021 22:29
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants