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

pgcrypto: make expensive functions respect context cancellation #111073

Open
steven-hubbard opened this issue Sep 21, 2023 · 1 comment
Open

pgcrypto: make expensive functions respect context cancellation #111073

steven-hubbard opened this issue Sep 21, 2023 · 1 comment
Labels
A-sql-builtins SQL built-in functions and semantics thereof. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@steven-hubbard
Copy link
Contributor

steven-hubbard commented Sep 21, 2023

Is your feature request related to a problem? Please describe.
When using the crypto gen_salt function setting the iter_count to the higher end of acceptable values can take a very long time to complete. While these values aren't normally in use, if an operator does decide to use one, then this can lock the cluster into a pretty resource intensive operation until it completes or the cluster is restarted.

Describe the solution you'd like
Ideally we would be able to interrupt these functions. It seems like the two possible solutions are to fork bcrypt or to wait for something like this pull request to be released in a newer version of go.

Jira issue: CRDB-31750

@steven-hubbard steven-hubbard added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Sep 21, 2023
@rafiss rafiss added A-sql-builtins SQL built-in functions and semantics thereof. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Sep 21, 2023
@rafiss rafiss changed the title Interruptible crypto functions pgcrypto: make expensive functions respect context cancellation Sep 21, 2023
@fqazi
Copy link
Collaborator

fqazi commented Sep 26, 2023

We need the crypto library extended to support taking in a context, so placing this in our long term backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-builtins SQL built-in functions and semantics thereof. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Status: Triage
Development

No branches or pull requests

4 participants