Commit ec6a632
authored
feat(executor-client): split function for local shard assignment (#7446)
<!-- Describe what has changed in this PR -->
**What changed?**
Instead of having a function that replace the assignment generated with
the local logic we have two different a functions, one to assign a new
shard and the other to remove the assignment. Also these function are
used in the canary to simulate the shard assignment.
The changes to the canary are made to make more similar to the matching
service.
<!-- Tell your future self why have you made these changes -->
**Why?**
we need to onboard matching and to model the local logic with assignment
replacement is adding too much complexity.
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
**How did you test it?**
local testing and unit testing
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
**Potential risks**
the change is only used in canary service which has been tested
<!-- Is it notable for release? e.g. schema updates, configuration or
data migration required? If so, please mention it, and also update
CHANGELOG.md -->
**Release notes**
<!-- Is there any documentation updates should be made for config,
https://cadenceworkflow.io/docs/operation-guide/setup/ ? If so, please
open an PR in https://github.com/cadence-workflow/cadence-docs -->
**Documentation Changes**
Signed-off-by: edigregorio <[email protected]>1 parent 748fc7d commit ec6a632
File tree
7 files changed
+322
-107
lines changed- service/sharddistributor
- canary
- executors
- externalshardassignment
- client/executorclient
7 files changed
+322
-107
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 88 | | |
95 | 89 | | |
96 | 90 | | |
| |||
Lines changed: 45 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| 48 | + | |
45 | 49 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
52 | 57 | | |
53 | 58 | | |
54 | 59 | | |
| |||
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
95 | 121 | | |
96 | 122 | | |
97 | 123 | | |
98 | 124 | | |
99 | 125 | | |
100 | 126 | | |
101 | 127 | | |
102 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
103 | 133 | | |
104 | 134 | | |
105 | 135 | | |
106 | 136 | | |
107 | 137 | | |
108 | 138 | | |
109 | | - | |
| 139 | + | |
110 | 140 | | |
111 | 141 | | |
112 | 142 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
Lines changed: 88 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
163 | 165 | | |
164 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
| |||
291 | 305 | | |
292 | 306 | | |
293 | 307 | | |
294 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
295 | 311 | | |
296 | 312 | | |
297 | 313 | | |
| |||
304 | 320 | | |
305 | 321 | | |
306 | 322 | | |
307 | | - | |
308 | | - | |
309 | 323 | | |
310 | | - | |
| 324 | + | |
311 | 325 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 326 | + | |
| 327 | + | |
316 | 328 | | |
317 | 329 | | |
318 | 330 | | |
319 | 331 | | |
320 | 332 | | |
321 | 333 | | |
322 | 334 | | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
343 | 340 | | |
344 | 341 | | |
345 | 342 | | |
346 | 343 | | |
347 | 344 | | |
348 | 345 | | |
349 | | - | |
| 346 | + | |
350 | 347 | | |
351 | 348 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
358 | 365 | | |
359 | | - | |
| 366 | + | |
360 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
361 | 373 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
366 | 383 | | |
367 | 384 | | |
368 | 385 | | |
369 | 386 | | |
370 | 387 | | |
371 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
372 | 419 | | |
373 | 420 | | |
374 | 421 | | |
| |||
0 commit comments