Commit fd86420
authored
Engine - Do not store operations that are not index into lucene in the translog (5.x only) (#25592)
When a replica processes out of order operations, it can drop some due to version comparisons. In the past that would have resulted in a VersionConflictException being thrown and ignored higher up. We changed this to have a cleaner flow that doesn't use exceptions. However, when backporting that change from master, we also back ported a change that isn't good for 5.x: we started storing these out of order ops in the translog. This is needed for the sequence number push, which also gives us some mechanism to deal with it later on during recovery. With the seq# this is not needed and can lead to deletes being lost (see the added test `testRecoverFromStoreWithOutOfOrderDelete` which fails without the fix).
Note that master also suffers from a similar issue but we will be pursuing a different solution there (still under discussion).1 parent ef84778 commit fd86420
File tree
4 files changed
+60
-31
lines changed- core/src
- main/java/org/elasticsearch
- action/bulk
- index/engine
- test/java/org/elasticsearch/index
- engine
- shard
4 files changed
+60
-31
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
| 509 | + | |
508 | 510 | | |
509 | 511 | | |
510 | 512 | | |
| |||
541 | 543 | | |
542 | 544 | | |
543 | 545 | | |
544 | | - | |
| 546 | + | |
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| |||
704 | 706 | | |
705 | 707 | | |
706 | 708 | | |
707 | | - | |
| 709 | + | |
708 | 710 | | |
709 | 711 | | |
710 | 712 | | |
| |||
758 | 760 | | |
759 | 761 | | |
760 | 762 | | |
| 763 | + | |
761 | 764 | | |
762 | 765 | | |
763 | 766 | | |
| 767 | + | |
764 | 768 | | |
765 | 769 | | |
766 | 770 | | |
| |||
Lines changed: 13 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2522 | 2522 | | |
2523 | 2523 | | |
2524 | 2524 | | |
2525 | | - | |
2526 | | - | |
| 2525 | + | |
| 2526 | + | |
2527 | 2527 | | |
2528 | 2528 | | |
2529 | 2529 | | |
| |||
2551 | 2551 | | |
2552 | 2552 | | |
2553 | 2553 | | |
2554 | | - | |
2555 | | - | |
2556 | 2554 | | |
2557 | 2555 | | |
2558 | 2556 | | |
| |||
2563 | 2561 | | |
2564 | 2562 | | |
2565 | 2563 | | |
2566 | | - | |
| 2564 | + | |
2567 | 2565 | | |
2568 | 2566 | | |
2569 | 2567 | | |
| |||
2577 | 2575 | | |
2578 | 2576 | | |
2579 | 2577 | | |
2580 | | - | |
2581 | | - | |
| 2578 | + | |
| 2579 | + | |
2582 | 2580 | | |
2583 | 2581 | | |
2584 | 2582 | | |
| |||
2587 | 2585 | | |
2588 | 2586 | | |
2589 | 2587 | | |
2590 | | - | |
2591 | | - | |
| 2588 | + | |
2592 | 2589 | | |
2593 | 2590 | | |
2594 | 2591 | | |
| |||
2597 | 2594 | | |
2598 | 2595 | | |
2599 | 2596 | | |
2600 | | - | |
2601 | | - | |
| 2597 | + | |
2602 | 2598 | | |
2603 | 2599 | | |
2604 | 2600 | | |
2605 | 2601 | | |
2606 | 2602 | | |
2607 | 2603 | | |
2608 | 2604 | | |
2609 | | - | |
2610 | | - | |
2611 | 2605 | | |
2612 | 2606 | | |
2613 | | - | |
| 2607 | + | |
2614 | 2608 | | |
2615 | | - | |
2616 | | - | |
| 2609 | + | |
2617 | 2610 | | |
2618 | 2611 | | |
2619 | | - | |
| 2612 | + | |
2620 | 2613 | | |
2621 | | - | |
2622 | | - | |
| 2614 | + | |
2623 | 2615 | | |
2624 | 2616 | | |
2625 | 2617 | | |
| |||
2645 | 2637 | | |
2646 | 2638 | | |
2647 | 2639 | | |
2648 | | - | |
2649 | | - | |
| 2640 | + | |
2650 | 2641 | | |
2651 | 2642 | | |
2652 | 2643 | | |
| |||
2658 | 2649 | | |
2659 | 2650 | | |
2660 | 2651 | | |
2661 | | - | |
2662 | | - | |
| 2652 | + | |
2663 | 2653 | | |
2664 | 2654 | | |
2665 | 2655 | | |
| |||
Lines changed: 40 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
285 | | - | |
| 288 | + | |
286 | 289 | | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | | - | |
| 295 | + | |
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
| |||
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
344 | | - | |
| 347 | + | |
345 | 348 | | |
346 | 349 | | |
347 | 350 | | |
| |||
353 | 356 | | |
354 | 357 | | |
355 | 358 | | |
356 | | - | |
| 359 | + | |
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| |||
914 | 917 | | |
915 | 918 | | |
916 | 919 | | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
917 | 952 | | |
918 | 953 | | |
919 | 954 | | |
| |||
1336 | 1371 | | |
1337 | 1372 | | |
1338 | 1373 | | |
1339 | | - | |
| 1374 | + | |
1340 | 1375 | | |
1341 | 1376 | | |
1342 | 1377 | | |
| |||
0 commit comments