Commit 600fdcb
SBALAVIGNESH123
fix: do not advance sequence state on failed commit (review feedback)
progressSequences() was called unconditionally after the retry loop,
which meant that if all MAX_COMMIT_RETRIES attempts failed the committed
SN would still advance — causing commitSNLocal() to persist a sequence
number for data that was never written to disk.
Now we track success with a bool flag and only call progressSequences()
on the success path. On the failure path we log the dropped range and
release the pool thread without acknowledging the sequence, so NativeLog
will replay the missing SN range on the next restart.
Addresses review feedback from @yokofly.1 parent a812443 commit 600fdcb
1 file changed
+20
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
861 | | - | |
862 | | - | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
863 | 865 | | |
864 | 866 | | |
| 867 | + | |
865 | 868 | | |
866 | 869 | | |
867 | 870 | | |
| |||
881 | 884 | | |
882 | 885 | | |
883 | 886 | | |
884 | | - | |
| 887 | + | |
885 | 888 | | |
886 | 889 | | |
887 | 890 | | |
| |||
897 | 900 | | |
898 | 901 | | |
899 | 902 | | |
900 | | - | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
901 | 913 | | |
902 | 914 | | |
903 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
904 | 918 | | |
905 | 919 | | |
906 | 920 | | |
907 | 921 | | |
908 | | - | |
909 | | - | |
| 922 | + | |
910 | 923 | | |
911 | 924 | | |
912 | 925 | | |
| |||
0 commit comments