Commit 224500f
[vpj][controller][common][test] Resolve external-storage dual-write per region
Problem: the VPJ external-storage dual-write path (added in #2821) made a
single global decision -- it read one storageMode and dual-wrote (or not)
identically for every region. With per-region external-storage sinks this
cannot express "region A is DUAL_WRITE, region B is INTERNAL".
This change resolves each region's store-level storageMode and fans out
external writes only to the DUAL_WRITE regions:
- New controller API getStorageModePerRegion (GET_PER_REGION_STORAGE_MODE):
the parent fans out to each child region's store-level storageMode and
returns Map<region, StorageMode>; a child controller returns its single
region. Store-level (not the new version's value) is read so the result is
available before the new version has propagated to child regions.
- VPJ resolves the DUAL_WRITE region list and forwards it to executors via
push.job.dual.write.target.regions, replacing the single
push.job.target.storage.mode.
- ExternalStorageWriter gains a region-aware configure(jobProps, topic,
partition, region) overload; the 3-arg overload is deprecated and kept as a
delegating default, so existing impls keep working (non-breaking).
- DualWriteVeniceWriter holds one ExternalStorageWriter per DUAL_WRITE region
and fans out batchPut/flush/close; a failure on any regional sink (after
retries) fails the push so no external store goes partially populated.
Testing: new multi-region e2e (TestVPJDualWriteExternalStorageMultiRegion)
sets dc0 DUAL_WRITE and dc1 INTERNAL via regionsFilter and asserts only dc0's
region-keyed sink is populated while dc1 stays empty and Venice still serves
every record. The existing single-region e2e and the VPJ unit tests
(including new fan-out tests) pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7b9f890 commit 224500f
21 files changed
Lines changed: 697 additions & 129 deletions
File tree
- clients/venice-push-job/src
- main/java/com/linkedin/venice
- hadoop
- mapreduce/datawriter/jobs
- task/datawriter
- spark/datawriter/jobs
- vpj
- test/java/com/linkedin/venice
- hadoop/task/datawriter
- vpj
- internal
- venice-common/src/main/java/com/linkedin/venice/controllerapi
- venice-test-common/src/integrationTest/java/com/linkedin/venice/endToEnd
- services/venice-controller/src/main/java/com/linkedin/venice/controller
- server
Lines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
2639 | 2641 | | |
2640 | 2642 | | |
2641 | 2643 | | |
2642 | | - | |
2643 | | - | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
2648 | 2650 | | |
2649 | | - | |
2650 | | - | |
| 2651 | + | |
2651 | 2652 | | |
2652 | 2653 | | |
2653 | 2654 | | |
| |||
3068 | 3069 | | |
3069 | 3070 | | |
3070 | 3071 | | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
| 3079 | + | |
| 3080 | + | |
| 3081 | + | |
| 3082 | + | |
| 3083 | + | |
| 3084 | + | |
| 3085 | + | |
| 3086 | + | |
| 3087 | + | |
| 3088 | + | |
| 3089 | + | |
| 3090 | + | |
| 3091 | + | |
| 3092 | + | |
| 3093 | + | |
| 3094 | + | |
| 3095 | + | |
| 3096 | + | |
3071 | 3097 | | |
3072 | 3098 | | |
3073 | 3099 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | | - | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
| 166 | + | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| |||
Lines changed: 23 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
| |||
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| 93 | + | |
95 | 94 | | |
96 | 95 | | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 605 | + | |
608 | 606 | | |
609 | 607 | | |
| 608 | + | |
610 | 609 | | |
611 | 610 | | |
612 | | - | |
613 | | - | |
614 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
615 | 616 | | |
616 | 617 | | |
617 | 618 | | |
| |||
633 | 634 | | |
634 | 635 | | |
635 | 636 | | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
640 | 645 | | |
641 | | - | |
| 646 | + | |
642 | 647 | | |
643 | 648 | | |
644 | 649 | | |
645 | 650 | | |
| 651 | + | |
646 | 652 | | |
647 | 653 | | |
648 | 654 | | |
649 | 655 | | |
650 | 656 | | |
651 | 657 | | |
652 | | - | |
| 658 | + | |
653 | 659 | | |
654 | 660 | | |
655 | 661 | | |
656 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
657 | 666 | | |
658 | 667 | | |
659 | 668 | | |
| |||
0 commit comments