forked from uber/cadence
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a "stale workflow" scanner/fixer impl, to remove data beyond reas…
…onable retention (uber#5361) For a variety of reasons, we have workflows sitting in some of our databases far beyond any reasonable time range. E.g. a workflow completed months ago in a domain with 7 day retention -> unfortunately still retained. We've been gradually finding and fixing problems that cause this, but the old data needs to be cleaned up at some point. They can sometimes cause problems, particularly if they appear to be "running". So this is a *conservative* scanner + fixer for workflows that meet these criteria. It does not handle all states, nor does it support domains configured with >200 day retention (hardcoded but trivially changeable, as a sanity check), but it's catching a large amount internally and seems safe to share and run in more locations. --- Since building and verifying this required figuring out the scanner/fixer code in detail, and that proved to be a significant effort, this also includes three major additions on top of the stale scanner: - there have been a variety of renames and public -> private changes to make naming consistent - this helped discover a significant issue with the current execution scanner, so I'm keeping it - concrete execution fixer invariants can now be individually enabled and disabled via dynamic config - a new readme.md file that attempts to summarize the learnings, and how to config and verify scanner/fixer.
- Loading branch information
Showing
29 changed files
with
2,338 additions
and
162 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.