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

feat(persistence): create pgx store #6359

Merged
merged 29 commits into from
Mar 30, 2023
Merged

Conversation

slonka
Copy link
Contributor

@slonka slonka commented Mar 28, 2023

⚠️ Please review with "w=1" - https://github.com/kumahq/kuma/pull/6359/files?w=1 to not show whitespace changes (I added Context() in tests and that added indent so without "w=1" it shows a lot of code that did not actually change).

There seems to be a weird behaviour in either pool.Close() / db.Close() or postgres itself that it does not always close the connections. As a workaround I'm bumping max_connections to 10k.

Side note:

  • deterministically not closing connections:
    • Bart's amd64 VM and amd64 macbook
    • My and Marcin's arm64 macbook
  • deterministically closing connections:
    • amd64 circleci VM

Closes #6363

Checklist prior to review

  • 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? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@slonka slonka added the ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) label Mar 28, 2023
@slonka slonka closed this Mar 28, 2023
@slonka slonka reopened this Mar 28, 2023
@slonka slonka closed this Mar 28, 2023
@slonka slonka mentioned this pull request Mar 28, 2023
6 tasks
@slonka slonka reopened this Mar 28, 2023
@slonka slonka added ci/skip-e2e-test PR: Don't run e2e tests and removed ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) labels Mar 28, 2023
@slonka slonka marked this pull request as ready for review March 29, 2023 11:43
@slonka slonka assigned lukidzi and unassigned lukidzi Mar 29, 2023
@slonka slonka requested a review from lukidzi March 29, 2023 11:45
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/core/bootstrap/bootstrap.go Outdated Show resolved Hide resolved
pkg/plugins/resources/postgres/pgx_store.go Outdated Show resolved Hide resolved
pkg/plugins/resources/postgres/store_template_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

Just nits

UPGRADE.md Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Outdated Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Show resolved Hide resolved
pkg/config/app/kuma-cp/kuma-cp.defaults.yaml Show resolved Hide resolved
pkg/plugins/resources/postgres/pgx_store.go Show resolved Hide resolved
tools/postgres/Dockerfile Show resolved Hide resolved
pkg/plugins/resources/postgres/plugin.go Show resolved Hide resolved
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.

Implement pgx version of resource store
5 participants