Skip to content
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

Add size key to option in forward protocol #1137

Merged

Conversation

ganmacs
Copy link
Member

@ganmacs ganmacs commented Aug 3, 2016

ref issue is #1135
But this patch some differences form #1135 proposed.
Because all we want to do is to suppress calling MessagePackEventStream#ensure_unpacked! , this patch did not add size to argument of MultiEventStream#initialize

@ganmacs ganmacs force-pushed the add-size-key-to-option-in-forward-protocol branch from 4273fec to 3867b88 Compare August 4, 2016 02:10
@@ -379,12 +443,18 @@ def create_target_input_driver(do_respond=false, disconnect=false, conf=TARGET_C
DummyEngineDriver.new(Fluent::ForwardInput) {
handler_class = Class.new(Fluent::ForwardInput::Handler) { |klass|
attr_reader :chunk_counter # for checking if received data is successfully deserialized
attr_reader :storage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found that this name (only for tests) is a bit misleading, because plugins in v0.14 may have "storage plugin" instances.
Could you rename this? Any names are ok... (e.g., data, received, content_options...)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sending array's length with msgpack is always 3, so remove FORWARD_HEADER_EXT
* pass `size` to initilizer of MessagePackEventStream if `size` exists in `option` at in_forward
* remove unnecessary condtion
@ganmacs ganmacs force-pushed the add-size-key-to-option-in-forward-protocol branch from 3867b88 to f43c084 Compare August 4, 2016 05:15
@ganmacs ganmacs force-pushed the add-size-key-to-option-in-forward-protocol branch from f43c084 to fb5f42e Compare August 4, 2016 06:35
@tagomoris
Copy link
Member

LGTM.
It might be better to add a configuration parameter to use traditional (v0) protocol, ... but I think it's not worth to do it (there are no variant implementation of in_forward as far as i know, especially something which cannot handle option).

@tagomoris
Copy link
Member

I went back to code, and found some points to be fixed. Sorry for late pointing.

@tagomoris
Copy link
Member

With this change, there are no reason to use @extend_internal_protocol. It's just same with @require_ack_response by your change. So I think it's better to remove @extend_internal_protocol and to use @require_ack_response instead of it.

* `@extend_internal_protocol` is same as `@require_ack_response`, so
  remove it.
@ganmacs
Copy link
Member Author

ganmacs commented Aug 5, 2016

Removed @extend_internal_protocoland began to use @require_ack_response instead of it.

@tagomoris
Copy link
Member

The code looks clean and straightforward! Great for merge.

@tagomoris tagomoris merged commit 0d93d45 into fluent:master Aug 5, 2016
@ganmacs ganmacs deleted the add-size-key-to-option-in-forward-protocol branch November 28, 2019 00:07
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.

2 participants