This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Postgres AccountsDB plugin does not capture all historical account writes #22124
Labels
Comments
Thanks for the finding -- will take a look. |
lijunwangs
added a commit
to lijunwangs/solana
that referenced
this issue
Dec 29, 2021
lijunwangs
added a commit
to lijunwangs/solana
that referenced
this issue
Dec 30, 2021
mergify bot
added a commit
that referenced
this issue
Jan 4, 2022
…22193) (#22259) * Fixed issue #22124 -- missing historical data if slot updated later. * Fixed a couple of comments (cherry picked from commit 5b6027b) Co-authored-by: Lijun Wang <[email protected]>
Closed
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem
The plugin wants to allow capturing historic account writes in the
account_audit
table and uses aAFTER UPDATE OR DELETE
trigger on theaccount
table to accomplish that.However, the individual writes to
account
have the form:which means that older conflicting writes where the
WHERE
condition is false will not update theaccount
table at all and not end up inaccount_audit
.Out-of-order writes will always be seen, even when using only one thread to write to postgres, because the account writes don't necessarily arrive at the accountsdb plugin in order.
(Here's a log that shows this out of order arrival. Note that the write_version is monotonic, but the slot isn't - even when looking at a single account.
Proposed Solution
Possibly writes need to be inserted into
account_audit
explicitly?@lijunwangs
The text was updated successfully, but these errors were encountered: