Commit 6ed7890
Update shardGenerations for all indices on snapshot finalization (#128650)
If an index is deleted after a snapshot has written its shardGenerations
file but before the snapshot is finalized, we exclude this index from the
snapshot because its indexMetadata is no longer available. However,
the shardGenerations file is still valid in that it is the latest copy with all
necessary information despite it containing an extra snapshot entry.
This is OK. Instead of dropping this shardGenerations file, this PR
changes to carry it forward by updating RepositoryData and relevant
in-progress snapshots so that the next finalization builds on top of this one.
Co-authored-by: David Turner <[email protected]>1 parent a25549d commit 6ed7890
File tree
14 files changed
+360
-53
lines changed- docs/changelog
- server/src
- main/java/org/elasticsearch
- repositories
- blobstore
- snapshots
- test/java/org/elasticsearch
- repositories
- blobstore
- snapshots
- test/framework/src/main/java/org/elasticsearch/snapshots
- x-pack/plugin
- core/src
- main/java/org/elasticsearch/snapshots/sourceonly
- test/java/org/elasticsearch/snapshots/sourceonly
- slm/src/test/java/org/elasticsearch/xpack/slm
14 files changed
+360
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
123 | 139 | | |
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | | - | |
409 | | - | |
| 409 | + | |
| 410 | + | |
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | | - | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
| 428 | + | |
427 | 429 | | |
428 | 430 | | |
429 | 431 | | |
430 | 432 | | |
431 | 433 | | |
432 | | - | |
| 434 | + | |
433 | 435 | | |
434 | 436 | | |
435 | 437 | | |
| |||
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 450 | + | |
| 451 | + | |
453 | 452 | | |
454 | 453 | | |
455 | 454 | | |
| |||
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
462 | | - | |
| 461 | + | |
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
| |||
244 | 254 | | |
245 | 255 | | |
246 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
247 | 271 | | |
248 | 272 | | |
249 | 273 | | |
| |||
254 | 278 | | |
255 | 279 | | |
256 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
257 | 284 | | |
258 | 285 | | |
259 | 286 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1749 | 1749 | | |
1750 | 1750 | | |
1751 | 1751 | | |
1752 | | - | |
1753 | 1752 | | |
1754 | 1753 | | |
1755 | 1754 | | |
1756 | | - | |
| 1755 | + | |
1757 | 1756 | | |
1758 | 1757 | | |
1759 | 1758 | | |
| |||
1867 | 1866 | | |
1868 | 1867 | | |
1869 | 1868 | | |
1870 | | - | |
| 1869 | + | |
1871 | 1870 | | |
1872 | 1871 | | |
1873 | 1872 | | |
| |||
0 commit comments