Commit 70135e3
committed
feat(engine): add memory-pressure backpressure guards and wire durable outbound queues
Write-path changes across document, vector, batch, and query layers:
- Reject writes with `LiteError::Backpressure` when the memory governor
reports `PressureLevel::Critical` in `document_put_impl`,
`vector_insert_impl`, `document_put_with_vector_batch_impl`, and the
batch vector ingest path.
- Wire all outbound enqueue calls through `reconcile_outbound_enqueue`
so backpressure errors are uniformly logged and propagated.
- FTS and spatial enqueue calls switched from direct durable enqueue to
the new staging path (`stage_index`, `stage_delete`, `stage_insert`);
the flush task spills staged entries to durable storage periodically.
- `NodeDbLite::open_inner` wires `StreamSeqTracker`, loads the Lite
identity (`lite_id` + `epoch`) for the handshake, opens all outbound
queues with the configured cap, and wires FTS/spatial outbound queues
into the query engine for SQL-path writes.
- `flush()` now drains the KV write buffer first and spills FTS/spatial
staging buffers to durable queues on each flush tick.
- Add `LiteError::Backpressure` variant; fix typo in SPDX identifiers.1 parent 847821f commit 70135e3
30 files changed
Lines changed: 838 additions & 251 deletions
File tree
- nodedb-lite/src
- nodedb
- collection
- core
- trait_impl
- query
- columnar_ops
- meta_ops
- physical_visitor
- adapter
- spatial_ops
- timeseries_ops
- visitor
- array
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
80 | 84 | | |
81 | 85 | | |
82 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
83 | 109 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| |||
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
197 | 193 | | |
198 | 194 | | |
199 | 195 | | |
| |||
260 | 256 | | |
261 | 257 | | |
262 | 258 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 259 | + | |
267 | 260 | | |
268 | 261 | | |
269 | 262 | | |
| |||
286 | 279 | | |
287 | 280 | | |
288 | 281 | | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 282 | + | |
293 | 283 | | |
294 | 284 | | |
295 | 285 | | |
| |||
405 | 395 | | |
406 | 396 | | |
407 | 397 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
| 398 | + | |
412 | 399 | | |
413 | 400 | | |
414 | 401 | | |
| |||
543 | 530 | | |
544 | 531 | | |
545 | 532 | | |
546 | | - | |
| 533 | + | |
| 534 | + | |
547 | 535 | | |
548 | 536 | | |
549 | 537 | | |
550 | 538 | | |
551 | 539 | | |
552 | 540 | | |
553 | 541 | | |
554 | | - | |
555 | | - | |
556 | 542 | | |
557 | 543 | | |
558 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| 91 | + | |
| 92 | + | |
86 | 93 | | |
87 | 94 | | |
88 | 95 | | |
| |||
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| 190 | + | |
| 191 | + | |
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| |||
289 | 298 | | |
290 | 299 | | |
291 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
292 | 322 | | |
293 | 323 | | |
294 | 324 | | |
0 commit comments