Log each unexpected history event once per execution - #1210
Open
manduinca wants to merge 1 commit into
Open
Conversation
A work item can carry the same unexpected event many times, and every occurrence was logged, filling the caller's logs with identical warnings. Report each (event, id) pair once per execution instead. Signed-off-by: Jean Pierre Mandujano G. <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A single work item can carry the same unexpected history event many times, and the worker logged every occurrence. That is where the thousand-plus identical
Ignoring unexpected timerFired event with ID = 5lines in #980 come from.The five places that reported an unexpected event (
timerFired,taskCompleted,taskFailed,childWorkflowInstanceCompleted,childWorkflowInstanceFailed) now go through one helper that remembers the(event, id)pairs already reported on the orchestration context and skips the repeats. A different id still gets its own line, replays stay silent as before, and since the context is rebuilt for everyexecute(), nothing accumulates across work items.The new test feeds three
timerFiredevents for unknown timers (5, 5, 7) and expects exactly two warnings; it fails onmainwith three.Issue reference
Please reference the issue this PR will close: #980
Checklist