fix(generator): panic-safety and visible drops at throttle and connection edges - #1917
Closed
blt wants to merge 2 commits into
Closed
fix(generator): panic-safety and visible drops at throttle and connection edges#1917blt wants to merge 2 commits into
blt wants to merge 2 commits into
Conversation
…tion edges The logrotate_fs model treats a non-advancing FUSE tick from a benign scheduling race as a no-op instead of aborting under panic=abort, per ADR-004. The tcp and udp generators count throttle-rejected blocks in blocks_discarded instead of dropping them with only a debug log, and label connection and request failures by io::ErrorKind rather than the raw error string, bounding the capture accumulator cardinality per ADR-005. The gRPC generator honors throttle rejections instead of sending regardless. The HTTP and Splunk HEC generators each own a connection semaphore instead of sharing a process-wide static that panicked on a second generator.
send_hec_request parsed the target-controlled response body with serde_json::from_slice::<HecResponse>().expect(). HecResponse is #[serde(deny_unknown_fields)], so any non-conforming body -- an error page, an empty body, an extra field, all routine from a real HEC target -- panicked and, under panic=abort, killed the run. Handle the parse error: log it, count request_failure with a bounded "response_parse" label (ADR-005), and skip the ack send, which simply times out. A well-formed body can also parse successfully with a null/absent ackId, since ack_id is Option and deny_unknown_fields does not make it required. Channel::Ack::send then fed that None to .expect() and aborted. Handle None at the source: skip the ack, count ack_id_missing, warn. Covers all callers, not just this path. Adds acknowledgements send tests. Also rewrite the connection-permit match as let...else in http and splunk_hec to satisfy clippy.
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Related issues
A list of issues either fixed, containing architectural discussions, otherwise relevant
for this Pull Request.
Additional Notes
Anything else we should know when reviewing?