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

Prepared statements issue #223

Merged
merged 6 commits into from
Sep 17, 2024
Merged

Prepared statements issue #223

merged 6 commits into from
Sep 17, 2024

Conversation

lassemand
Copy link
Collaborator

@lassemand lassemand commented Sep 16, 2024

Purpose

Global prepared statement are causing issues when using them from another thread.

Changes

Always reinitialise prepared statements, but use cache to ensure to lower overhead.
Bump psql to version 14 because would only initialise version 11 as is. This might give issues.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@lassemand lassemand requested review from DOBEN and soerenbf September 16, 2024 17:50
@lassemand lassemand marked this pull request as draft September 16, 2024 17:53
@lassemand lassemand marked this pull request as ready for review September 16, 2024 17:57
Copy link

@Victor-N-Suadicani Victor-N-Suadicani left a comment

Choose a reason for hiding this comment

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

I guess it's fine?

More long term, we really should switch to a framework like sqlx which handles prepared queries and caching completely automatically.

notification-server/src/database.rs Outdated Show resolved Hide resolved
@lassemand
Copy link
Collaborator Author

I guess it's fine?

More long term, we really should switch to a framework like sqlx which handles prepared queries and caching completely automatically.

I will write a task on that: https://linear.app/concordium/issue/MIS-93/cleanup-use-sqlx

@lassemand lassemand merged commit 9f443d9 into main Sep 17, 2024
4 checks passed
@lassemand lassemand deleted the lma/fix/prepared_statement branch September 17, 2024 07:00
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