Repository navigation
Conversation
Roll deferred per-tag buffers at a 256 KiB target without splitting records. Keep completed buffers ordered and hand them to core only from the collector. Drain accepted buffers during graceful shutdown, including after a pause. Detach each in-flight buffer and prevent nested drains when backpressure re-enters the pause callback. Keep ordinary new records subject to memory admission while preserving the callback-owner shutdown allowance. Fixes fluent#12519. Signed-off-by: Michael Renner <terrorobe@github.com>
Exercise chunk bounds, full payload and group context, per-tag order, retained originals, and chained rewrite_tag paths through the real engine. Cover oversized records, partially filled core chunks, backpressure, late shutdown deliveries and new-record admission. The grouped cases require the prerequisite group-framing fix in fluent#12500. Signed-off-by: Michael Renner <terrorobe@github.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch had an error being deployed
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.
This draft PR targets
masterand depends on the group-framing change below. The branch contains only emitter changes and must not merge before the prerequisite.Currently, the emitter appends each tag's entire pending buffer to the engine in one piece, so a
rewrite_tagburst can produce chunks far larger than the 2 MB chunk target.Batching changes:
With smaller batches, a backpressure pause can leave accepted records queued in the emitter, and records still queued in a
rewrite_tagemitter at shutdown are currently discarded. Shutdown changes:Fixes #12519.
Testing
Tested on Linux/amd64 with master a415d1b and the prerequisite at 8795652. This PR branch intentionally excludes the prerequisite; its grouped-record tests are expected to fail against
masteruntil #12500 merges. Once it lands, we will update this branch and rerun CI.The new runtime test,
tests/runtime/filter_rewrite_tag_burst.c, sends bursts through the real engine and verifies every delivered record: identity, order, payload, timestamp, and group context. It covers:keep=trueduplication, chained rewrites, and native output processorsWithout the emitter changes, the size checks fail. The new test and the existing multiline tests (the other emitter user) pass under ASan/UBSan and Valgrind; the
rewrite_tagand multiline integration tests pass under strict Valgrind.ok-package-testlabel: packaging is unchangedRegression output and verification commands
The automated burst regression uses an in-process collector and library output callbacks. To reproduce the burst manually with a local build, run this
dummy → rewrite_tag → nullpipeline from the repository root:Wait for the output to drain, then press Ctrl-C. With only the prerequisite applied, the whole burst arrives as one chunk:
With this change:
5 × 2,074,968 + 1,976,160 = 12,351,000bytes, matching the baseline.2,048,000 + 262,144 = 2,310,144bytes.Equivalent build and CTest commands, run from the repository root:
To run the existing group-preservation and multiline integration scenarios from the repository root:
Valgrind command, run from the repository root, and output excerpt:
Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.