Commit 1b11ed2
authored
[Reset] Track child workflows initiated after reset (temporalio#7210)
## What changed?
In this PR I'm recording a set of children that were initialized after
the reset point. The children are identified by
"workflow_type:workflow_id" key.
## Why?
When the parent starts to make progress after reset, it needs to know
all the children that were already started after the reset point. In the
current iteration of the feature we will use this information to
terminate any running child before starting another instance.
We need this information mainly for 2 reasons.
1. If we don't attempt to terminate the parent may not make progress due
to ID conflict policy
2. On the other hand, always terminating all children before starting is
also wrong since we may,
- Terminate any children that may be started in the future that were not
present at the time of reset.
- Terminate children belonging to a different parent.
So, we need to record an exact set of children that were observed (at
the time of reset) to have been initialized after the reset point.
## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->
## 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) -->1 parent 8de299c commit 1b11ed2
File tree
2 files changed
+35
-0
lines changed- service/history/ndc
2 files changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
648 | 656 | | |
649 | 657 | | |
650 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
651 | 664 | | |
652 | 665 | | |
653 | 666 | | |
| |||
656 | 669 | | |
657 | 670 | | |
658 | 671 | | |
| 672 | + | |
659 | 673 | | |
660 | 674 | | |
661 | 675 | | |
| |||
721 | 735 | | |
722 | 736 | | |
723 | 737 | | |
| 738 | + | |
724 | 739 | | |
725 | 740 | | |
726 | 741 | | |
| |||
733 | 748 | | |
734 | 749 | | |
735 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
736 | 754 | | |
737 | 755 | | |
738 | 756 | | |
| |||
743 | 761 | | |
744 | 762 | | |
745 | 763 | | |
| 764 | + | |
746 | 765 | | |
747 | 766 | | |
748 | 767 | | |
| |||
768 | 787 | | |
769 | 788 | | |
770 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
771 | 805 | | |
772 | 806 | | |
773 | 807 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
| 827 | + | |
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
| |||
0 commit comments