Skip to content

in_tcp, in_syslog: keep at-limit messages across split delimiters - #5655

Open
git-jxj wants to merge 1 commit into
fluent:masterfrom
git-jxj:fix/tcp-split-delimiter-limit
Open

git-jxj wants to merge 1 commit into
fluent:masterfrom
git-jxj:fix/tcp-split-delimiter-limit

Conversation

@git-jxj

@git-jxj git-jxj commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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 - 1 extra bytes in the incomplete frame buffer. Complete messages are still checked against the same payload limit. This affects both emission paths in in_tcp and traditional framing in in_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_tcp and in_syslog now keep valid messages at the configured length limit when a multi-byte delimiter spans TCP reads.

Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant