Commit f729a92
committed
fix(pager): refresh the nonce anchor mid-operation instead of per-commit
The main-db nonce counter could only run anchor_budget values ahead of
the anchor durable in the A/B header, and only a header write advanced
it. Ordinary commits write a header every time, but a compaction
rebuild, a rekey re-seal, and an incremental apply all seal many pages
before publishing anything, so each drew its entire run from a single
window and silently stopped working above a fixed store size.
Add a HeaderCursor/anchor-refresh path (src/pager/anchor.rs) that
rewrites the live header with only the anchor advanced, publishing
nothing else, and wire every writer path (commit, catalog write,
apply-journal clear, snapshot apply, rekey) through the pager's shared
cursor instead of carrying its own copy of the A/B slot and sequence.
Rebuild the dense-repack and rekey paths on top of this: replace the
one-shot BTree::bulk_load with a streaming, push-style BulkLoader
(src/btree/tree/bulk/) so a rebuild holds one leaf and one internal
node per level rather than the whole dataset, and stream the source
tree into it in bounded batches with periodic flushes bounded by the
buffer-pool budget.
Also drop the legacy 13-byte rekey-state row and its conservative
same-KEK migration: every durable intent row still on disk is now the
fixed-width form, so decode_rekey_state returns a RekeyIntent directly
and an off-width row is rejected outright.1 parent 478d5bf commit f729a92
26 files changed
Lines changed: 1747 additions & 498 deletions
File tree
- src
- btree
- tests
- tree
- bulk
- catalog
- tests
- compaction
- crypto
- pager
- snapshot/tests
- txn
- db
- open
- rekey
- write
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
736 | 829 | | |
737 | 830 | | |
738 | 831 | | |
| |||
This file was deleted.
0 commit comments