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

perf(store): postgres transactions #7995

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

jakubdyszkiewicz
Copy link
Contributor

Checklist prior to review

Introducing postgres transactions.
This PR does NOT introduce need for transactions in Kuma, this is just a perf optimization for stores that support transactions.

Enrich ResourceStore vs new interface

I introduced a new interface called Transactions, so the transaction can be used by either ResourceStore and ResourceManager. If I would add a new method in ResourceStore we would also add this to ResourceManager.

Transaction in Context vs store opts

I decided to propagate transaction implicitly in context instead of explicitly in store opts like CreateInTx(tx). This is more flexible with less changes to the code. We could also for example open a transaction when we create new Mesh without adding CreateInTx to every call.

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

Signed-off-by: Jakub Dyszkiewicz <[email protected]>
@jakubdyszkiewicz jakubdyszkiewicz requested a review from a team as a code owner October 10, 2023 07:50
@jakubdyszkiewicz jakubdyszkiewicz requested review from bartsmykla and lobkovilya and removed request for a team October 10, 2023 07:50
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
@jakubdyszkiewicz jakubdyszkiewicz merged commit 31fdd6e into kumahq:master Oct 11, 2023
@jakubdyszkiewicz jakubdyszkiewicz deleted the feat/dp-transactions branch October 11, 2023 15:07
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