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

Buffer: Fix that compress setting causes unexpected error when receiving already compressed MessagePack #4147

Merged

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Apr 12, 2023

Which issue(s) this PR fixes:

What this PR does / why we need it:
Fix that compress setting causes an unexpected error when receiving already compressed MessagePack.

When setting compress gzip of buffer, and it tries to process CompressedMessagePackEventStream, the following error occurs.

[error]: xxx unexpected error on reading data
host="xxx" port=xxx error_class=ArgumentError
error="unknown keyword: :packer"

This is caused by the signature unmatching in c6c6c03.

A possible use case is a two-stage transfer.

Forwarder1(out_forward) -> Forwarder2(in_forward, out_forward) -> Aggregator(in_forward)

In this case, Forwarder2 should process the data of CompressedMessagePackEventStream as is (i.e. without decompressing) and re-transfer the data to Aggregator.

Docs Changes:
Not needed.

Release Note:
Same as the title.

When setting `compress gzip` of buffer, and it tries to process
CompressedMessagePackEventStream, the following error occurs.

    [error]: xxx unexpected error on reading data
    host="xxx" port=xxx error_class=ArgumentError
    error="unknown keyword: :packer"

This is caused by the signature unmatch in
c6c6c03.

A possible use case is a two-stage transfer.

Forwarder1(out_forward) -> Forwarder2(in_forward, out_forward) ->
Aggregator(in_forward)

In this case, Forwarder2 should process the data of
`CompressedMessagePackEventStream` as is (i.e. without
decompressing) and re-transfer the data to Aggregator.

Signed-off-by: Daijiro Fukuda <[email protected]>
@daipom daipom marked this pull request as ready for review April 12, 2023 10:39
@daipom daipom requested a review from ashie April 12, 2023 10:39
@ashie ashie merged commit c989079 into fluent:master Apr 13, 2023
@ashie
Copy link
Member

ashie commented Apr 13, 2023

Thanks!

@ashie ashie added this to the v1.16.1 milestone Apr 13, 2023
@daipom daipom deleted the buffer-fix-error-compressing-alreay-compressed-es branch April 13, 2023 07: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.

Buffer: Can't write already compressed MessagePack EventStream as is
2 participants