Commit 0883ca2
authored
Keep syncing User Data as long as version changes (temporalio#7320)
## What changed?
<!-- Describe what has changed in this PR -->
UserDataManger in child partitions constantly fetches data from the
parent partition. There is a safely mechanism to prevent busy loop in
case the parent returns result immediately instead of only when the data
is updated.
The safety mechanism did not work well with Versioning 3 because many
updates are involved in a single tests. With this update we relax the
safety check to only apply when the user data version remains the same
and continue to fetch the data asap as long as each time it gets new
data.
Here, also I'm relaxing the "requested task queue user data for version
greater than known version" errors to be thrown only for the root
partition, as they can normally happen for child partitions.
## Why?
<!-- Tell your future self why have you made these changes -->
So that back-to-back Versioning 3 APIs do not have to wait for a long
time.
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
Existing tests.
## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->
## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->
## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
Yes.1 parent 288f4ce commit 0883ca2
File tree
4 files changed
+51
-34
lines changed- config/dynamicconfig
- service/matching
4 files changed
+51
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
323 | 325 | | |
324 | 326 | | |
325 | 327 | | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
347 | | - | |
| 350 | + | |
| 351 | + | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
| |||
575 | 579 | | |
576 | 580 | | |
577 | 581 | | |
578 | | - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
579 | 604 | | |
580 | 605 | | |
581 | 606 | | |
| |||
590 | 615 | | |
591 | 616 | | |
592 | 617 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 618 | + | |
618 | 619 | | |
619 | 620 | | |
620 | 621 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
| |||
552 | 554 | | |
553 | 555 | | |
554 | 556 | | |
555 | | - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
556 | 560 | | |
557 | 561 | | |
558 | 562 | | |
| |||
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
624 | | - | |
| 628 | + | |
625 | 629 | | |
626 | 630 | | |
627 | 631 | | |
| |||
672 | 676 | | |
673 | 677 | | |
674 | 678 | | |
675 | | - | |
| 679 | + | |
676 | 680 | | |
677 | 681 | | |
678 | 682 | | |
| |||
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
730 | | - | |
| 734 | + | |
731 | 735 | | |
732 | 736 | | |
733 | 737 | | |
| |||
0 commit comments