fix(sqlite-native): keep truncate cache coherent#4637
Conversation
Code Review: PR #4637 —
|
| Severity | Issue |
|---|---|
| Low | Cache eviction runs before the failable kv_put; on failure the cache is not restored (no corruption, just a stale miss). Move eviction to after the successful write. |
| Low | No tests covering the read_cache truncation paths. |
| Nit | Boundary-chunk path re-fetches from KV even when the read cache is warm (pre-existing). |
The core logic of both fixes is correct. The main concern is the ordering of cache eviction relative to the failable kv_put. Since the read cache is disabled by default, the practical impact is minimal, but fixing the ordering would make the error-handling contract consistent across the function.
4079bac to
459dd12
Compare
4303e83 to
60882a2
Compare
459dd12 to
d7b2c43
Compare
5f174d0 to
c75356d
Compare
d7b2c43 to
6c17fae
Compare
c75356d to
dfaae41
Compare
6c17fae to
a070720
Compare
dfaae41 to
c087ffb
Compare
a070720 to
51a4f79
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: