cockroachdb / cockroachdb/cockroach
kvserver: avoid lock loss when approaching lock table limits
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
**Describe the problem**
Currently, when the in-memory lock table accumulates more than a set amount of unreplicated locks, it removes them.
As part of the buffered writes project, we would like to depend on unreplicated locks. Every lost lock represents a retriable error (in the case of SSI transactions) or hard failure (RC) that will need to be returned to the user.
One proposed solution here is to proactively shift the durability of these locks from replicated to unreplicated when the lock table approaches this size limit. This would be based on something like the FlushLockTableRequest prototyped in #141821
Jira issue: CRDB-50491
Contributor guide
Assessment
This issue has not been assessed yet.