Repository navigation
fix(propeller): record events Admin already has in the dedup filter - #7852
Merged
Sovietaced merged 1 commit intoAug 14, 2026
Merged
Conversation
The event sink only adds an event id to its dedup filter after a clean send. When Admin answers AlreadyExists, the id is never recorded, so every re-emit of that event passes the filter, takes a token from the sink's rate limiter and makes a round trip that cannot succeed. An execution that keeps re-emitting a recorded event can exhaust the limiter and starve the other executions sharing it. Record the id when Admin reports it already has the event, or that the entity is already terminal. The error is still returned, so callers see what they saw before. Signed-off-by: 1fanwang <1fannnw@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7852 +/- ##
==========================================
+ Coverage 57.22% 57.24% +0.01%
==========================================
Files 931 931
Lines 58269 58269
==========================================
+ Hits 33347 33354 +7
+ Misses 21859 21854 -5
+ Partials 3063 3061 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
I've been meaning to look into this issue after seeing HUGE amounts of |
Sovietaced
approved these changes
Aug 14, 2026
2 of 3 tasks
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.
Why are the changes needed?
adminEventSink.Sinkkeeps a dedup filter so an event that has already been recorded doesn't go back to Admin. The id is only added to that filter after a clean send:When Admin answers
AlreadyExists, the sink returns the wrapped error and the id is never recorded. Every later re-emit of that event passesfilter.Contains, takes a token from the sink's rate limiter, and makes a round trip that cannot succeed.The limiter is shared by every execution the propeller is running. One execution re-emitting a recorded event can drain it, and the executions that needed those tokens get
ResourceExhausted:What changes were proposed in this pull request?
Add the id to the dedup filter when Admin reports it already has the event, so later re-emits are answered by the
filter.Containscheck instead of spending limiter capacity.The error is still returned, and
filter.Containsreturns that same code for a locally known duplicate, so callers see no change either way.Only
AlreadyExistsis filtered.EventAlreadyInTerminalStateis deliberately left out: callers act on it —nodeerrors.IllegalStateErrorinnode_exec_context.go, a forced transition toWorkflowPhaseFailedinworkflow/executor.go— and folding it into the filter would replay it asAlreadyExists, which those same callers map to nil.How was this patch tested?
TestAdminEventSink_AlreadyExistsDrainsRateLimiterbuilds the sink the wayNewAdminEventSinkdoes in production — a realOppoBloomFilterand a real token-bucket limiter, with only the Admin client stubbed, answeringcodes.AlreadyExistsas a real Admin does for an event it already holds. It re-emits that event ten times against a limiter with ten tokens, then checks an unrelated execution can still record its own event.Raw output
Without the fix:
With the fix:
The rest of the package, including
TestAdminAlreadyExistsErrorwhich pins the returned error:Labels
fixed
Check all the applicable boxes