cockroachdb / cockroachdb/cockroach
pgcrypto: make expensive functions respect context cancellation
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**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 ](https://github.com/golang/go/issues/56416) to be released in a newer version of go.
Jira issue: CRDB-31750
Epic CRDB-60810
Contributor guide
Assessment
This issue has not been assessed yet.