Repository navigation
Conversation
Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
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.
Which issue(s) this PR fixes:
Follow-up to #5624.
What this PR does / why we need it:
A TCP read can end with the first byte of a CRLF delimiter. When the payload is already at
message_length_limit, counting that byte against the limit discards an otherwise valid message.Allow up to
delimiter.bytesize - 1extra bytes in the incomplete frame buffer. Complete messages are still checked against the same payload limit. This affects both emission paths inin_tcpand traditional framing inin_syslog.The regression tests wait until the input has actually received the CR before sending the LF. All three cases lose the at-limit message on master and keep it with the fix.
Both input test files pass (104 tests), and RuboCop reports no offenses in the four changed files. The full local run completed 4,891 tests. All 136 failures and errors from unrelated tests were reproduced by rerunning those cases on unmodified master with the same dependency lock.
Docs Changes:
The existing plugin documentation already tells users the delimiter is excluded from the message.
Release Note:
in_tcpandin_syslognow keep valid messages at the configured length limit when a multi-byte delimiter spans TCP reads.