Repository navigation
Commit 71d675b
live ledger: admit a commit by the pages it really dirtied, refuse nothing that fits, and keep service mode as it was
The reservation multiplied a worst-case B-tree path cost per mutation before BEGIN,
so one input with one action reserved about 36 MB and a 1 GiB budget refused an
input with about 30 actions at under 5% real usage: a false refusal.
- Admission now happens immediately before COMMIT: a finite-budget connection runs
with cache_spill off, the page cache is sampled after every trigger, split and
overflow allocation as an upper bound on all the pages the transaction touches,
and the commit is admitted or refused before the first WAL write; a refusal
unwinds through the rollback and leaves the file unchanged. The cost is that the
dirty pages stay in memory until COMMIT, which the documentation states.
Unlimited runs keep normal spilling. The reservation function takes an extra
payload margin and returns the admission callback a writer attaches to its
transaction, so the checkpoint writer can use it.
- The service-mode budget requirement ships off (today's behaviour) behind its one
named function; --ledger-unbounded stays implemented; the three unrelated e2e
edits that added it are reverted. The CHANGELOG says service mode does not
require a budget in this release.
- The migration reserves what it writes, the offline redeliver path goes through the
reservation, new rows commit 1, 10 and 100 actions under a small budget, initialise
a ledger under 64 MB and upgrade a base-written ledger under a finite budget; the
documentation gives the measured order of the headroom and the one-way migration.
This rewrites passages introduced by c9bfb29 and 792b229: the sentences that
described the reservation before BEGIN and "deliberately exceeds" growth, the
"Its independent slack ceiling for the two-event input fixture is" sentence, and
the statement that service mode requires a budget.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>1 parent 792b229 commit 71d675b
10 files changed
Lines changed: 455 additions & 222 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
194 | | - | |
195 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
196 | 215 | | |
197 | 216 | | |
198 | 217 | | |
| |||
243 | 262 | | |
244 | 263 | | |
245 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
246 | 268 | | |
247 | 269 | | |
248 | 270 | | |
249 | 271 | | |
250 | 272 | | |
251 | 273 | | |
252 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
253 | 281 | | |
254 | 282 | | |
255 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
1234 | 1234 | | |
1235 | 1235 | | |
1236 | 1236 | | |
1237 | | - | |
| 1237 | + | |
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| |||
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
1255 | 1260 | | |
1256 | 1261 | | |
1257 | 1262 | | |
| |||
1282 | 1287 | | |
1283 | 1288 | | |
1284 | 1289 | | |
| 1290 | + | |
| 1291 | + | |
1285 | 1292 | | |
1286 | 1293 | | |
1287 | 1294 | | |
| |||
1304 | 1311 | | |
1305 | 1312 | | |
1306 | 1313 | | |
1307 | | - | |
| 1314 | + | |
1308 | 1315 | | |
1309 | 1316 | | |
1310 | 1317 | | |
| |||
0 commit comments