Support opening an in-use rocksdb as secondary#10209
Support opening an in-use rocksdb as secondary#10209solana-grimes merged 12 commits intosolana-labs:masterfrom
Conversation
| let allow_dead_slots = arg_matches.is_present("allow_dead_slots"); | ||
| output_ledger( | ||
| open_blockstore(&ledger_path), | ||
| open_blockstore(&ledger_path, AccessType::AllowSecondary), |
There was a problem hiding this comment.
TODO: carefully audit for the appropriate AccessType for all of subcommands.
There was a problem hiding this comment.
Done, I've tested all the subcommands and they worked as intended.
@mvines FYI, I found graph to be very useful to create a graph right from a still running validator's ledger. :)
There was a problem hiding this comment.
totally, this is gonna be yuuuuge!
|
|
CI is broken... ;) |
|
TODO: maybe don't fallback by default; instead explicit |
|
This looks very promising, thanks @ryoqun |
3be691a to
e88a3c9
Compare
Codecov Report
@@ Coverage Diff @@
## master #10209 +/- ##
=========================================
- Coverage 81.3% 81.3% -0.1%
=========================================
Files 288 288
Lines 67000 67135 +135
=========================================
+ Hits 54510 54603 +93
- Misses 12490 12532 +42 |
I've tested enough. Be confident to start using the secondary fallback by default. |
1042882 to
890e823
Compare
|
@mvines This is ready for review!! :) |
mvines
left a comment
There was a problem hiding this comment.
It looks like solana-validator opens with AccessType::OnlyPrimary (Blockstore::open_with_signal)?
| Self::do_open_with_signal(ledger_path, AccessType::OnlyPrimary) | ||
| } | ||
|
|
||
| pub fn open_with_signal_with_access_type( |
There was a problem hiding this comment.
| pub fn open_with_signal_with_access_type( | |
| pub fn open_with_signal_and_access_type( |
@mvines Yeah, I deliberately do so because...:
|
Co-authored-by: Michael Vines <mvines@gmail.com>
automerge (cherry picked from commit caa7f7a) # Conflicts: # ledger-tool/Cargo.toml # ledger-tool/src/main.rs
automerge (cherry picked from commit caa7f7a)
Problem
it seems that the rocksdb's notorious limitation is now lifted: facebook/rocksdb#4899 ㊗️
Maybe our bitter experience caused blindness for the rocksdb; it's certainly improving. ;)
Summary of Changes
Fallback to secondary access when primary failed from
ledget-tool's read-only subcommands.solana-validatorand other subcommands behavior hasn't been changed.This realizes to run
create-snapshotwhile a validator is running and other various debugging subcommands.PS: I know my half-backed
ledger-toolpr #9490 is laying around... Sorry for our longer pr queue. ;) I thought this worth to interrupt. :)