Get rid of noisy task adding failure log in matching service #5445
+13
−21
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.
What changed?
Failed to add task error log for
remote sync match failed
scenario seems to be too noisy (96% of matching logs). We log it for multiple cases such asThere's already a metric
cadence_errors_remote_syncmatch_failed_per_tl
counting this specific case and it has the same breakdown as the log doesSo the change is to remove this log line. Other sub categories of
Failed to add task
error log will still be logged by the matching context's handleErr as anUncategorized error
. This seems fine to me but open for feedback here. We can keep those other sub types around and just get rid ofremote sync match failed
because it's a known type w/ its own counter.Misc Change
Only signal taskReader if there's no error and no sync match found. Previously it was signaling even for sync matches but that looked unnecessary as nothing is written to persistence for sync match AFAICT. This can help reduce the unnecessary DB calls during sync matches.
Why?
Since this log entry adds no extra visibility and floods the logs, there's no point of keeping it.
How did you test it?
make test
Potential risks
Not signaling task reader for sync matches can have side effects I am not able to see. Looking forward to review feedback on this.