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

Removing forked writes #30

Open
linuskendall opened this issue Jun 22, 2022 · 0 comments
Open

Removing forked writes #30

linuskendall opened this issue Jun 22, 2022 · 0 comments

Comments

@linuskendall
Copy link

This is related to: lijunwangs/solana-postgres-rpc-server#3

When slots that were on forks end up being skipped, we're storing inconsistent state data in the accounts table.

Proposed solution:

Add a trigger that will delete entries from accounts table which are on status processed whenever a new slot is rooted. Something like:

delete from accounts where slot < new_rooted_slot and slot.status=processed'

For this to work it would require that previous entries exists in accounts_audit table.

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

No branches or pull requests

1 participant