-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Cache msgpack packer/unpacker #2559
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
ganmacs
force-pushed
the
cache-msgpack
branch
3 times, most recently
from
August 15, 2019 02:20
afc8b57
to
5e5dfb3
Compare
repeatedly
reviewed
Aug 16, 2019
lib/fluent/event_router.rb
Outdated
@@ -182,7 +184,7 @@ def filter_stream(tag, es) | |||
|
|||
def optimized_filter_stream(tag, es) | |||
new_es = MultiEventStream.new | |||
es.each do |time, record| | |||
es.each(unpacker: @unpacker) do |time, record| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe? event_router
and pipeline
can be called from multiple inputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
b8021e9
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
daipom
added a commit
to daipom/fluentd
that referenced
this pull request
May 15, 2023
Fixes bug in c6c6c03 (fluent#2559). Received incomplete data must not affect data from other senders. Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
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:
What this PR does / why we need it:
cache msgpack packer/unpacker not to create unnecessary objects.
https://gist.github.com/ganmacs/a620be919851d49bff3bf2de58da2052 shows decreasing CPU time of
Fluent::EventStream#to_msgpack_stream
andFluent::MessagePackFactory::Mixin#msgpack_packer
.Docs Changes:
no need
Release Note:
same as title