Commit fbfe22c
fix(hot): MemKvRwTx read cursor now sees queued writes (#32)
`HotKvRead for MemKvRwTx` previously returned `MemKvCursor` which only
sees committed data. This caused read cursors on write transactions to
miss pending writes, creating an inconsistency with `raw_get` which
already checked queued ops. Change `Traverse` type to `MemKvCursorMut`
which merges committed data with queued writes.
Also fix a pre-existing bug in `MemKvCursorMut::last_of_k1` where the
k1 comparison used full MAX_KEY_SIZE bytes against the shorter encoded
key, causing it to always return None.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 9c3b2b8 commit fbfe22c
2 files changed
+17
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1061 | 1063 | | |
1062 | 1064 | | |
1063 | 1065 | | |
| |||
1265 | 1267 | | |
1266 | 1268 | | |
1267 | 1269 | | |
1268 | | - | |
| 1270 | + | |
1269 | 1271 | | |
1270 | 1272 | | |
1271 | | - | |
1272 | | - | |
| 1273 | + | |
1273 | 1274 | | |
1274 | 1275 | | |
1275 | 1276 | | |
| |||
1318 | 1319 | | |
1319 | 1320 | | |
1320 | 1321 | | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | | - | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
1329 | 1326 | | |
1330 | 1327 | | |
1331 | 1328 | | |
| |||
0 commit comments