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

Fix for compound messages containing >255 messages. #239

Merged
merged 1 commit into from Jan 25, 2022

Conversation

stevesg
Copy link
Contributor

@stevesg stevesg commented Jul 8, 2021

If ever more than 255 messages are put into a compound message, then the resulting packet will be malformed leading to errors on the receiving end such as:

Failed to decode ping request: codec.decoder: Only encoded map or array can be decoded into a struct. (valueType: 2)

This change sends multiple packets if required. The alternative approach would be to limit the number of messages that GetBroadcasts can return, by e.g. passing in a maximum number of messages, but this would require changing the Delegate interface, possibly breaking downstream code.

@hashicorp-cla
Copy link

hashicorp-cla commented Jul 8, 2021

CLA assistant check
All committers have signed the CLA.

Copy link

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

This fix makes sense to me 👍

@markan markan self-assigned this Oct 19, 2021
@markan
Copy link
Contributor

markan commented Nov 9, 2021

This looks reasonable at first glance. I'm very curious how you found this. Can you give any details on the situation?

@pracucci
Copy link

This looks reasonable at first glance. I'm very curious how you found this. Can you give any details on the situation?

We're experiencing this when running large Cortex clusters and we found it after some debugging.

Copy link
Contributor

@markan markan left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me.

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

5 participants