Commit 1b5612b
committed
perf(fast-inbox): roll back inbox messages by bucket, not by message (A-1388)
Finding the cut point for an L1-block rollback walked the messages backwards from
the tip, deserializing every message being removed just to learn where the removal
starts. A bucket lives entirely within one L1 block and its snapshot now records
that block plus the bucket's first message index, so scan the bucket snapshots
instead — a few records per L1 block rather than one per message.1 parent 825cb9b commit 1b5612b
2 files changed
Lines changed: 32 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| |||
505 | 508 | | |
506 | 509 | | |
507 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
508 | 532 | | |
509 | 533 | | |
510 | 534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
585 | 588 | | |
586 | 589 | | |
587 | 590 | | |
588 | 591 | | |
589 | | - | |
590 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
591 | 595 | | |
592 | 596 | | |
593 | | - | |
| 597 | + | |
594 | 598 | | |
595 | 599 | | |
596 | 600 | | |
| |||
0 commit comments