Commit a2d9525
committed
feat: auto-compaction for distributed 2PC durable log
Adds set_auto_compact_threshold(N) to DistributedTransactionManager.
When N > 0, the manager fires txn_log_->compact() after every Nth
successful transaction completion, keeping the WAL file bounded
without operator intervention. Threshold 0 (default) preserves the
existing manual-compaction behavior.
Compaction only fires in maybe_log_complete(), i.e. after a fully
successful phase 2. In-doubt transactions (phase-2 failure) are
untouched and still recoverable on startup.1 parent c1bda13 commit a2d9525
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| |||
277 | 285 | | |
278 | 286 | | |
279 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
280 | 292 | | |
281 | 293 | | |
282 | 294 | | |
| |||
326 | 338 | | |
327 | 339 | | |
328 | 340 | | |
329 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
330 | 350 | | |
331 | 351 | | |
332 | 352 | | |
| |||
0 commit comments