cockroachdb / cockroachdb/pebble
db: audit key, value length limit
- Dominant language
- Go
- Stars
- 6k
- Forks
- 584
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 5
Description
We use `int32` to represent key length in some places. Audit the maximum length of a key or value. It might be the case that we can update the code to always use at least a `uint32` to represent both, allowing both key and value to be up to 4GiB. Regardless, we should also enforce that the user cannot commit (either via a batch or an ingested sstable) a key or value longer than whatever we support.
Note that we already enforce a 4GiB limit on the maximum size of a batch.
https://cockroachlabs.slack.com/archives/CAC6K3SLU/p1750964434500359
Jira issue: PEBBLE-510
Contributor guide
No contributing guide indexed for this repository
Research direction
Audit the places that represent key and value lengths, then trace the batch commit and ingested SSTable paths mentioned in the issue. Determine the supported maximum for each and verify that both paths reject keys or values beyond it, while preserving the existing 4GiB batch limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100