Skip to content

fix: get-biggest-programs panics on non-64-partition layouts - #6

Open
gamandeepsingh wants to merge 1 commit into
solana-rpc:mainfrom
gamandeepsingh:fix/dbtool-query
Open

fix: get-biggest-programs panics on non-64-partition layouts#6
gamandeepsingh wants to merge 1 commit into
solana-rpc:mainfrom
gamandeepsingh:fix/dbtool-query

Conversation

@gamandeepsingh

Copy link
Copy Markdown

get-biggest-programs iterated a hardcoded 0..64 range to query snapshot_accounts_p0 through snapshot_accounts_p63. Anyone on the default 10-partition HASH layout only has p0p9, so the tool panicked the moment it hit snapshot_accounts_p10.

Fixed by querying pg_tables for the actual snapshot_accounts_p* partitions instead of assuming 64. Works correctly regardless of partition count.

Closes #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

crates/dbtools/ - get-biggest-programs panics for anyone using the default 10-partition HASH layout.

1 participant