Repository navigation
Commit 2f9ad30
committed
Introduce CommitWindow to fix validation in multi-producer retry
_validate_concurrency was resolving the catalog HEAD via
_parent_snapshot_id, which breaks when a Transaction has multiple
producers (_DeleteFiles + _OverwriteFiles). On retry, the second
producer's parent points to the first producer's uncommitted snapshot,
which does not exist in the catalog metadata, causing a spurious
ValidationException.
CommitWindow explicitly separates the two snapshot references that
validation needs: starting_snapshot_id (fixed at operation start) and
catalog_head_snapshot_id (the actual catalog HEAD after refresh).
_rebuild_snapshot_updates builds one CommitWindow and shares it across
all producers, so each validates against the real catalog state.
Add test_mixed_delete_overwrite_retries_successfully to cover the
multi-producer retry path end-to-end.
Signed-off-by: Sotaro Hikita <bering1814@gmail.com>1 parent 58ba6b0 commit 2f9ad30
3 files changed
Lines changed: 99 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1133 | 1133 | | |
1134 | 1134 | | |
1135 | 1135 | | |
| 1136 | + | |
1136 | 1137 | | |
1137 | 1138 | | |
1138 | 1139 | | |
1139 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1140 | 1148 | | |
| 1149 | + | |
1141 | 1150 | | |
1142 | 1151 | | |
1143 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
98 | 111 | | |
99 | 112 | | |
100 | 113 | | |
| |||
109 | 122 | | |
110 | 123 | | |
111 | 124 | | |
| 125 | + | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| |||
144 | 158 | | |
145 | 159 | | |
146 | 160 | | |
| 161 | + | |
147 | 162 | | |
148 | 163 | | |
149 | 164 | | |
| |||
407 | 422 | | |
408 | 423 | | |
409 | 424 | | |
410 | | - | |
411 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
412 | 429 | | |
413 | 430 | | |
414 | 431 | | |
| |||
421 | 438 | | |
422 | 439 | | |
423 | 440 | | |
424 | | - | |
425 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
426 | 446 | | |
427 | 447 | | |
428 | 448 | | |
| |||
435 | 455 | | |
436 | 456 | | |
437 | 457 | | |
438 | | - | |
| 458 | + | |
439 | 459 | | |
440 | 460 | | |
441 | | - | |
442 | | - | |
| 461 | + | |
| 462 | + | |
443 | 463 | | |
444 | 464 | | |
445 | 465 | | |
446 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
447 | 477 | | |
| 478 | + | |
448 | 479 | | |
449 | 480 | | |
450 | 481 | | |
| |||
456 | 487 | | |
457 | 488 | | |
458 | 489 | | |
459 | | - | |
460 | | - | |
| 490 | + | |
| 491 | + | |
461 | 492 | | |
462 | 493 | | |
463 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
636 | | - | |
| 635 | + | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
| 645 | + | |
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
| |||
651 | 651 | | |
652 | 652 | | |
653 | 653 | | |
654 | | - | |
655 | | - | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
656 | 658 | | |
657 | | - | |
| 659 | + | |
658 | 660 | | |
659 | 661 | | |
660 | 662 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
671 | | - | |
| 673 | + | |
672 | 674 | | |
673 | 675 | | |
674 | 676 | | |
| |||
677 | 679 | | |
678 | 680 | | |
679 | 681 | | |
680 | | - | |
681 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
682 | 686 | | |
683 | 687 | | |
684 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
0 commit comments