influxdata / influxdata/influxdb
Don't increase cache size when write failed
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
I notice in TestCache_CacheWriteMulti_TypeConflict test, we assume cache size won't increase when writing failed, but actually, it adds key size, I think this may be a bug. So this test cannot pass
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tsdb/engine/tsm1/cache.go at lines 342-354 and the failing scenario in tsdb/engine/tsm1/cache_test.go at lines 110-116, especially TestCache_CacheWriteMulti_TypeConflict. Run that focused test first, then trace the failed write and cache-size accounting. Done means the test passes and a failed write no longer increases the cache size.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100