Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Describe what has changed in this PR --> **What changed?** I discovered an issue with the `ExecutableWrapper` [here](https://github.com/temporalio/temporal/blob/df4705d6488485ae12e27f4cb1c719b62c980304/service/history/queues/executable.go#L451). Because we don't wrap the `Reschedule` method, it adds the unwrapped version to the rescheduler, which loses all of the wrapped behavior. I implemented a fix using the "delegate" pattern, where the base instance holds a reference to the wrapped instance, but it is fraught with peril: you need to remember to use the delegate everywhere it's applicable, and you need to remember to set it--also only one delegate can be set, so you can't have different wrappers for the same object. As a result, I decided to get rid of the wrapper-based approach, and instead added the code directly to the base executable implementation. <!-- Tell your future self why have you made these changes --> **Why?** The huge refactoring is necessary because the `ExecutableWrapper` approach is too complicated and risky. <!-- How have you verified this change? Tested locally? Added a unit test? Checked in staging env? --> **How did you test it?** There's still 100% test coverage for the DLQ code. Most imporantly, there is now an end-to-end integration test which starts a workflow that produces terminally failing tasks, verifies that it's added to the DLQ, and then uses the tdbg read command to delete the DLQ tasks. This wasn't possible before due to the bug in the `ExecutableWrapper`. <!-- Assuming the worst case, what can be broken when deploying this change to production? --> **Potential risks** <!-- Is this PR a hotfix candidate or require that a notification be sent to the broader community? (Yes/No) --> **Is hotfix candidate?**
- Loading branch information
1 parent
276d610
commit c3d53ba
Showing
39 changed files
with
624 additions
and
1,425 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.