Commit a388c48
Ensure all-ephemeral transactions don't consume a tx offset (#3884)
Views are materialized in mutable transactions, but should not increment
the transaction offset maintained in the committed state.
This fixes storing completely empty transactions in the commitlog, and
maintains that the committed state tx offset is in-sync with the
commitlog's tx offset.
# Expected complexity level and risk
2
# Testing
Added a test.
---------
Signed-off-by: Kim Altintop <kim@eagain.io>
Co-authored-by: Mazdak Farrokhzad <twingoow@gmail.com>1 parent b1676ab commit a388c48
3 files changed
Lines changed: 66 additions & 15 deletions
File tree
- crates
- core/src/db
- datastore/src
- locking_tx_datastore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 821 | + | |
827 | 822 | | |
828 | 823 | | |
829 | 824 | | |
830 | 825 | | |
831 | 826 | | |
832 | | - | |
| 827 | + | |
833 | 828 | | |
834 | 829 | | |
835 | 830 | | |
| |||
840 | 835 | | |
841 | 836 | | |
842 | 837 | | |
843 | | - | |
| 838 | + | |
844 | 839 | | |
845 | 840 | | |
846 | 841 | | |
| |||
849 | 844 | | |
850 | 845 | | |
851 | 846 | | |
852 | | - | |
| 847 | + | |
853 | 848 | | |
854 | 849 | | |
855 | 850 | | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| |||
2632 | 2632 | | |
2633 | 2633 | | |
2634 | 2634 | | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
2635 | 2665 | | |
2636 | 2666 | | |
2637 | 2667 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
747 | 747 | | |
748 | 748 | | |
749 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
750 | 755 | | |
751 | 756 | | |
752 | 757 | | |
753 | 758 | | |
754 | 759 | | |
755 | 760 | | |
756 | 761 | | |
757 | | - | |
758 | | - | |
759 | 762 | | |
760 | 763 | | |
761 | 764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
255 | 265 | | |
256 | 266 | | |
257 | 267 | | |
| |||
304 | 314 | | |
305 | 315 | | |
306 | 316 | | |
307 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
311 | | - | |
312 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
313 | 331 | | |
314 | 332 | | |
315 | 333 | | |
| |||
0 commit comments