Commit a21d38e
committed
fix(pager): bound the free-list scan to a fixed window per commit
Loading and rewriting the whole durable free-list chain on every write
made both the buffer-pool residency and the commit's IO scale with the
number of free pages in the store, defeating the bounded-memory budget
on the hottest path in the system.
begin_write now materialises only a fixed window of the chain
(read_chain_prefix / ChainWalk), the allocator cache is loaded from
that window alone, and the following commit rewrites just the window
and splices the fresh pages onto the untouched retained tail. Callers
that need the full entry set (follower reclaim fold, rekey's page
walk, fsck-style checks) stream the chain page-by-page instead of
materializing it. The free-list module is split into a directory
(layout/read/write/budget) along the way, and gains crash-boundary and
windowed-rewrite regression coverage.1 parent 97bcc32 commit a21d38e
21 files changed
Lines changed: 2199 additions & 482 deletions
File tree
- .config
- src
- btree/tree
- pager
- freelist
- tests
- snapshot/tests
- txn
- db
- rekey
- write
- tests
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
210 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| |||
0 commit comments