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

Add ledger tool command print-file-metadata #26790

Merged
merged 1 commit into from
Sep 7, 2022
Merged

Add ledger tool command print-file-metadata #26790

merged 1 commit into from
Sep 7, 2022

Conversation

yhchiang-sol
Copy link
Contributor

@yhchiang-sol yhchiang-sol commented Jul 26, 2022

Summary of Changes

This PR adds a ledger tool subcommand print-file-metadata.

USAGE:
    solana-ledger-tool print-file-metadata [FLAGS] [OPTIONS] [SST_FILE_NAME]

    Prints the metadata of the specified ledger-store file.
    If no file name is unspecified, then it will print the metadata of all ledger files

Example output:

$ ./solana-ledger-tool print-file-info --ledger /mnt/disks/ledger/mainnet/
[/001434.sst] cf_name: meta, level: 0, start_slot: Some(143642862), end_slot: Some(143663961), size: 921933, num_entries: 983
[/001366.sst] cf_name: meta, level: 0, start_slot: Some(143642588), end_slot: Some(143663209), size: 935010, num_entries: 952
[/001284.sst] cf_name: meta, level: 0, start_slot: Some(143642308), end_slot: Some(143662497), size: 856478, num_entries: 910
[/001217.sst] cf_name: meta, level: 1, start_slot: Some(143635799), end_slot: Some(143661855), size: 17901824, num_entries: 24601
[/001435.sst] cf_name: erasure_meta, level: 0, start_slot: Some(143663208), end_slot: Some(143663961), size: 1157783, num_entries: 21389
[/001367.sst] cf_name: erasure_meta, level: 0, start_slot: Some(143662497), end_slot: Some(143663209), size: 1174356, num_entries: 21699
[/001285.sst] cf_name: erasure_meta, level: 0, start_slot: Some(143661853), end_slot: Some(143662497), size: 1105676, num_entries: 20436
...

@yhchiang-sol yhchiang-sol marked this pull request as draft July 26, 2022 15:58
@yhchiang-sol yhchiang-sol changed the title (WIP) Add ledger tool subcommand recover-blockstore-file Add ledger tool subcommand print-file-info Jul 29, 2022
@yhchiang-sol yhchiang-sol requested a review from ryoqun July 29, 2022 14:42
@yhchiang-sol yhchiang-sol marked this pull request as ready for review July 29, 2022 16:40
@yhchiang-sol yhchiang-sol changed the title Add ledger tool subcommand print-file-info (Ledger tool) Add command print-file-info Jul 30, 2022
@ryoqun
Copy link
Contributor

ryoqun commented Aug 1, 2022

(you got my eyes on this pr. i'll review this later..)

@stale
Copy link

stale bot commented Aug 13, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Aug 13, 2022
@yhchiang-sol yhchiang-sol removed the stale [bot only] Added to stale content; results in auto-close after a week. label Aug 27, 2022
@yhchiang-sol yhchiang-sol requested a review from steviez August 28, 2022 01:23
ledger-tool/src/main.rs Outdated Show resolved Hide resolved
ledger-tool/src/main.rs Outdated Show resolved Hide resolved
ledger-tool/src/main.rs Outdated Show resolved Hide resolved
ledger-tool/src/main.rs Outdated Show resolved Hide resolved
@yhchiang-sol yhchiang-sol requested a review from steviez September 2, 2022 01:17
steviez
steviez previously approved these changes Sep 6, 2022
Copy link
Contributor

@steviez steviez left a comment

Choose a reason for hiding this comment

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

Should be fairly rare that we'd need this information but useful to have it available as CLI instead of having to hack the command together

@mergify mergify bot dismissed steviez’s stale review September 6, 2022 19:58

Pull request has been modified.

@yhchiang-sol yhchiang-sol changed the title (Ledger tool) Add command print-file-info Add ledger tool command print-file-info Sep 6, 2022
@yhchiang-sol yhchiang-sol changed the title Add ledger tool command print-file-info Add ledger tool command print-file-metadata Sep 7, 2022
@yhchiang-sol yhchiang-sol merged commit ed00365 into solana-labs:master Sep 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants