Commit 1f080e3
authored
Fix Snapshot State Machine Issues around Failed Clones (#76419)
With recent fixes it is never correct to simply remove a snapshot from the cluster state without
updating other snapshot entries if an entry contains any successful shards due to possible dependencies.
This change reproduces two issues resulting from simply removing snapshot without regard for other queued
operations and fixes them by having all removal of snapshot from the cluster state go through the same
code path.
Also, this change moves the tracking of a snapshot as "ending" up a few lines to fix an assertion about finishing
snapshots that forces them to be in this collection.1 parent e305a6b commit 1f080e3
File tree
4 files changed
+92
-39
lines changed- server/src
- internalClusterTest/java/org/elasticsearch/snapshots
- main/java/org/elasticsearch
- repositories
- snapshots
- test/framework/src/main/java/org/elasticsearch/snapshots/mockstore
4 files changed
+92
-39
lines changedLines changed: 65 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
736 | 737 | | |
737 | 738 | | |
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 | + | |
739 | 800 | | |
740 | 801 | | |
741 | 802 | | |
| |||
772 | 833 | | |
773 | 834 | | |
774 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
775 | 840 | | |
776 | 841 | | |
777 | 842 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 9 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| 1379 | + | |
1379 | 1380 | | |
1380 | 1381 | | |
1381 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1382 | 1385 | | |
1383 | 1386 | | |
1384 | | - | |
1385 | 1387 | | |
1386 | 1388 | | |
1387 | 1389 | | |
| |||
1741 | 1743 | | |
1742 | 1744 | | |
1743 | 1745 | | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1747 | 1749 | | |
1748 | 1750 | | |
1749 | 1751 | | |
1750 | 1752 | | |
1751 | 1753 | | |
1752 | | - | |
| 1754 | + | |
1753 | 1755 | | |
1754 | 1756 | | |
1755 | 1757 | | |
| |||
1904 | 1906 | | |
1905 | 1907 | | |
1906 | 1908 | | |
1907 | | - | |
1908 | | - | |
1909 | | - | |
1910 | | - | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
1914 | | - | |
1915 | | - | |
1916 | | - | |
1917 | | - | |
1918 | | - | |
1919 | | - | |
1920 | | - | |
1921 | | - | |
1922 | | - | |
1923 | | - | |
1924 | | - | |
1925 | | - | |
1926 | | - | |
1927 | | - | |
1928 | | - | |
1929 | | - | |
1930 | | - | |
1931 | | - | |
1932 | | - | |
1933 | 1909 | | |
1934 | 1910 | | |
1935 | 1911 | | |
| |||
1946 | 1922 | | |
1947 | 1923 | | |
1948 | 1924 | | |
1949 | | - | |
| 1925 | + | |
1950 | 1926 | | |
1951 | 1927 | | |
1952 | 1928 | | |
| |||
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| 274 | + | |
271 | 275 | | |
272 | 276 | | |
273 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
274 | 283 | | |
275 | 284 | | |
276 | 285 | | |
| |||
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | | - | |
314 | | - | |
| 322 | + | |
| 323 | + | |
315 | 324 | | |
316 | 325 | | |
317 | 326 | | |
| |||
555 | 564 | | |
556 | 565 | | |
557 | 566 | | |
558 | | - | |
559 | | - | |
560 | | - | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
561 | 573 | | |
562 | 574 | | |
563 | 575 | | |
| |||
0 commit comments