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

MessagePackFactory: Make sure to reset local unpacker to prevent received broken data from affecting other receiving data #4178

Merged
merged 1 commit into from May 16, 2023

Conversation

daipom
Copy link
Contributor

@daipom daipom commented May 15, 2023

Which issue(s) this PR fixes:
None.

@tkoba66 reported this bug. Thanks!

When in_forward abnormally receives incomplete (broken) data, it can't correctly receive the next sent data.

One of the main possible cases is as follows.

  • There are multiple senders (out_forward) to one receiver (in_forward).
  • An anomaly such as power failure occurs in one sender, and it sends broken data to the receiver.
  • It can break the next data sent from another healthy sender.

What this PR does / why we need it:
Fixes bug in c6c6c03 (#2559).

Received incomplete data must not affect data from other senders.

In #2559, the local unpacker started to be cached to improve the performance, but this caused the problem where corrupted data was unintentionally left in the cached unpacker, which resulted in the next data being broken too.

Docs Changes:
Not needed.

Release Note:
Same as the title.

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>
@daipom daipom requested a review from ashie May 15, 2023 07:16
Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

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

LGTM

Waiting for CI

@ashie ashie merged commit dc7e4b2 into fluent:master May 16, 2023
13 of 16 checks passed
@ashie
Copy link
Member

ashie commented May 16, 2023

@tkoba66 Thanks for your report!

@daipom daipom deleted the make-sure-to-reset-local-unpacker branch May 16, 2023 00:27
@daipom daipom added this to the v1.16.2 milestone Oct 9, 2023
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.

None yet

2 participants