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

pindexer: name the database in error messages #4881

Open
conorsch opened this issue Oct 4, 2024 · 1 comment
Open

pindexer: name the database in error messages #4881

conorsch opened this issue Oct 4, 2024 · 1 comment

Comments

@conorsch
Copy link
Contributor

conorsch commented Oct 4, 2024

Someone running pindexer for the first time reported a first-run error, which read:

Error: error returned from database: relation "block_details" does not exist

Any pindexer instance requires two (2) databases: read-only access to the raw CometBFT ABCI events db, and full write access (with schema creation privileges) to its own database, to store the munged events. The table block_details only exists in the latter, so that's what the error message is pointing to, but a user likely won't know that ahead of time. Let's wrap the error message with more context to guide the user.

Given how frequently we're updating the pindexer schema, recommending resetting that db from scratch is maybe a good idea too.

@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Oct 4, 2024
@cronokirby
Copy link
Contributor

An idea here is that we can maybe add some things to the app view trait to give each component a name and monotonic version, so that we can store metadata about which views the database was compiled with, and then error if the set has changed, and the database is not empty.

This would allow us to give a detailed error explaining what needs to be done.

@aubrika aubrika added this to Penumbra Oct 7, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Penumbra Oct 7, 2024
@aubrika aubrika removed the needs-refinement unclear, incomplete, or stub issue that needs work label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants