-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in_emitter: write msgpack buffer directly(#4049) #4128
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Takahiro Yamashita <[email protected]>
Performance
configuration parameterRemove
Logmaster + this patch
v1.8.7
|
In previous implementation, in_emitter has 2 buffers. - 1. rewrite_tag -> in_emitter_add_record -> msgpack_sbuffer_write - 2. (timer thread. every 0.5 sec) cb_queue_chunks -> flb_input_chunk_append_raw 'mem_buf_limit' is for flb_input_chunk API, so the thread 1 doesn't have limits. The patch is to modify writing sequence. rewrite_tag -> in_emitter_add_record -> flb_input_chunk_append_raw Signed-off-by: Takahiro Yamashita <[email protected]>
If in_emitter pauses before original input plugin pauses, some records will emit even if keep option is disabled. Since keep property is only used when emitting is success. Signed-off-by: Takahiro Yamashita <[email protected]>
nokute78
force-pushed
the
emitter_limit
branch
from
October 3, 2021 08:29
9b15e35
to
e2b566e
Compare
User reported the original issue was fixed, but the patch caused side effect. I updated this PR to fix side effect. |
4 tasks
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.
Fixes #4049
Currently, in_emitter has 2 queues and first queue doesn't have memory limit.
It causes #4049.
#4049 (comment)
This patch is to modify to use single queue and write data directly to use 'mem_buf_limit'.
rewrite_tag -> in_emitter_add_record -> flb_input_chunk_append_raw.
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
Documentation
Example Configuration
Debug output
This patch reports
[2021/09/27 16:41:27] [error] [input:emitter:dummy_new] error registering chunk with tag: new
.It means
mem_buf_limit
works.Valgrind output
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.