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

Fix lost updates with long running transactions #29

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

paolochiodi
Copy link
Member

The original c extension we aim to be a drop-in replacements
has a check to avoid insterting multiple history rows
in the same transaction
(see arkhipov/temporal_tables@b563fb3)

We kept this check in our port, but we introduced a bug in which
updated and deletes from all currently running transactions
may also be discarded, because we check xmin against txid_current_snapshot.

I fix it as suggested by @kjs222 on #27 by checking it only against txid_current.

The original c extension we aim to be a drop-in replacements
has a check to avoid insterting multiple history rows
in the same transaction
(see arkhipov/temporal_tables@b563fb3)

We kept this check in our port, but we introduced a bug in which
updated and deletes from all currently running transactions
may also be discarded, because we check `xmin` against `txid_current_snapshot`.

I fix it as suggested by @kjs222 by checking only against `txid_current`.
@WonderPanda
Copy link

Hey @paolochiodi thanks for your work on this. The ability to use Temporal Table patterns in environments like AWS is awesome.

Just wondering if there are any updates for this PR or reasons why it could not be merged? Following the discussion from #27 it seems like this is potentially an important fix.

@brendanlong
Copy link

Should this PR be closed since the fix is applied on master? 34994fe

I was confused by the open PR.

@simoneb
Copy link
Member

simoneb commented Oct 29, 2022

I don't know, considering that #27 is still open. @paolochiodi ?

@brendanlong
Copy link

Wait maybe I was confused and looking at the history of this branch somehow. I don't think this is merged.

@simoneb
Copy link
Member

simoneb commented Nov 2, 2022

@brendanlong I think the commit you see is in the draft PR linked to that issue, which is this page :)

@simoneb simoneb marked this pull request as ready for review January 3, 2023 10:50
@simoneb simoneb linked an issue Jan 3, 2023 that may be closed by this pull request
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.

Updates Not Recorded When Long Running Transactions Are Open
5 participants