cockroachdb / cockroachdb/pebble
db: audit ctx.Background() uses, adopt cancellation on Close()
- Dominant language
- Go
- Stars
- 6k
- Forks
- 584
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 5
Description
loadNewFileStats might take a long time if stats collection is running behind (e.g. sstables are backed by object storage). We only check `d.closed` in the beginning, then try to process all updated files:
https://github.com/cockroachdb/pebble/blob/d8d0e1e90a46148e20919811399d3d7ff837dbf3/table_stats.go#L165
Jira issue: PEBBLE-1346
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with loadNewFileStats in table_stats.go around the linked lines and audit the ctx.Background() uses requested by the issue. Trace the stats-collection path and Close() handling to identify work that should observe cancellation. Done means the relevant background work is cancellable when the database closes, with tests covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100