Commit b66db0f
committed
MDEV-32115: Log checkpoint race with wsrep_sst_method=rsync
Galera snapshot transfer (SST) using the default wsrep_sst_method=rsync
is prone to creating corrupted snapshots. The probability for this is
rather low and might only affect installations that include
ENGINE=InnoDB tables that contain FULLTEXT INDEX.
The function sst_disable_innodb_writes() aims to disable all InnoDB writes
during the time a snapshot transfer (SST) is in progress using the
default wsrep_sst_method=rsync.
The logic based on invoking log_make_checkpoint() almost works, except
for two things: We failed to ensure that fts_optimize_callback() has
stopped executing, and we did not block updates of the log checkpoint
header.
log_checkpoint_low(): Assert that writes to the log are allowed.
buf_flush_page_cleaner(): Do not try to advance the checkpoint while
wsrep_sst_method=rsync is in progress. This prevents the assertion
in log_checkpoint_low() from failing.
fts_optimize_pause(), fts_optimize_resume(): Pause and resume the
fts_optimize_callback().
sst_disable_innodb_writes(): Disable all background writers
before initiating the log checkpoint.
fts_optimize_callback(): Assert that wsrep_sst_method=rsync is not
active, and remove the previous incorrect attempt at fixing this race.1 parent 3d2ae78 commit b66db0f
4 files changed
Lines changed: 63 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| 1969 | + | |
1969 | 1970 | | |
1970 | 1971 | | |
1971 | 1972 | | |
| |||
2550 | 2551 | | |
2551 | 2552 | | |
2552 | 2553 | | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
| 2558 | + | |
2553 | 2559 | | |
2554 | 2560 | | |
2555 | 2561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 40 | | |
48 | 41 | | |
49 | 42 | | |
| |||
52 | 45 | | |
53 | 46 | | |
54 | 47 | | |
55 | | - | |
| 48 | + | |
56 | 49 | | |
57 | 50 | | |
58 | 51 | | |
| |||
230 | 223 | | |
231 | 224 | | |
232 | 225 | | |
233 | | - | |
| 226 | + | |
234 | 227 | | |
235 | 228 | | |
236 | 229 | | |
| |||
2831 | 2824 | | |
2832 | 2825 | | |
2833 | 2826 | | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
2834 | 2831 | | |
2835 | 2832 | | |
2836 | 2833 | | |
| |||
2841 | 2838 | | |
2842 | 2839 | | |
2843 | 2840 | | |
2844 | | - | |
2845 | | - | |
2846 | | - | |
2847 | | - | |
2848 | | - | |
2849 | | - | |
2850 | | - | |
2851 | | - | |
2852 | | - | |
2853 | | - | |
2854 | | - | |
2855 | 2841 | | |
2856 | 2842 | | |
2857 | 2843 | | |
| |||
2872 | 2858 | | |
2873 | 2859 | | |
2874 | 2860 | | |
2875 | | - | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
2876 | 2868 | | |
2877 | 2869 | | |
2878 | 2870 | | |
| |||
2898 | 2890 | | |
2899 | 2891 | | |
2900 | 2892 | | |
2901 | | - | |
2902 | | - | |
2903 | | - | |
2904 | | - | |
2905 | | - | |
2906 | 2893 | | |
2907 | 2894 | | |
2908 | 2895 | | |
| |||
2945 | 2932 | | |
2946 | 2933 | | |
2947 | 2934 | | |
2948 | | - | |
2949 | | - | |
2950 | | - | |
2951 | | - | |
2952 | | - | |
| 2935 | + | |
| 2936 | + | |
2953 | 2937 | | |
2954 | 2938 | | |
2955 | 2939 | | |
| |||
2993 | 2977 | | |
2994 | 2978 | | |
2995 | 2979 | | |
2996 | | - | |
2997 | | - | |
2998 | | - | |
| 2980 | + | |
| 2981 | + | |
2999 | 2982 | | |
3000 | 2983 | | |
3001 | 2984 | | |
| |||
3004 | 2987 | | |
3005 | 2988 | | |
3006 | 2989 | | |
3007 | | - | |
| 2990 | + | |
3008 | 2991 | | |
3009 | 2992 | | |
3010 | 2993 | | |
| |||
3034 | 3017 | | |
3035 | 3018 | | |
3036 | 3019 | | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
3037 | 3040 | | |
3038 | 3041 | | |
3039 | 3042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1779 | 1779 | | |
1780 | 1780 | | |
1781 | 1781 | | |
1782 | | - | |
1783 | 1782 | | |
| 1783 | + | |
1784 | 1784 | | |
| 1785 | + | |
1785 | 1786 | | |
1786 | 1787 | | |
1787 | 1788 | | |
| |||
1793 | 1794 | | |
1794 | 1795 | | |
1795 | 1796 | | |
| 1797 | + | |
1796 | 1798 | | |
1797 | 1799 | | |
1798 | | - | |
1799 | | - | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
1800 | 1803 | | |
1801 | 1804 | | |
1802 | 1805 | | |
| |||
1811 | 1814 | | |
1812 | 1815 | | |
1813 | 1816 | | |
| 1817 | + | |
| 1818 | + | |
1814 | 1819 | | |
1815 | 1820 | | |
1816 | 1821 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
| 627 | + | |
| 628 | + | |
632 | 629 | | |
633 | 630 | | |
634 | 631 | | |
| |||
651 | 648 | | |
652 | 649 | | |
653 | 650 | | |
654 | | - | |
655 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
656 | 660 | | |
657 | 661 | | |
658 | 662 | | |
| |||
0 commit comments