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(HMS-2757): use transactions for reservations #707

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

lzap
Copy link
Member

@lzap lzap commented Oct 11, 2023

During investigation on the linked bug, I noticed this. I am not sure if this is root cause of the problems we currently see on stage, but chances are this is actually caused by the performance testing and throttle limiting.

This needs to be fixed no matter of what.

})

if txErr != nil {
return fmt.Errorf("pgx tx error: %w", txErr)
}
return nil
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make things simple and because pgx.Tx and pgx.Pool are incompatible types, I am putting this in tx block although it does not need to be. I think I could have used pgx.Querier or some interface, not sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah Querier is not from the pgx package, I would rather not use it. These are two different types.

Copy link
Member

@ezr-ondrej ezr-ondrej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🧡

@ezr-ondrej ezr-ondrej merged commit 6e6de60 into RHEnVision:main Oct 11, 2023
6 checks passed
@lzap lzap deleted the use-tx branch October 11, 2023 09:34
@lzap
Copy link
Member Author

lzap commented Oct 11, 2023

And it works...

image

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.

2 participants