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

Improve error log for frame size too big and maxMessageSize #459

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

zzzming
Copy link
Contributor

@zzzming zzzming commented Feb 2, 2021

Motivation

This PR is to improve error log for frame size too big on the consumer. We have seen a number of frame size too big error and I would like to trace what the exact maxMessageSize is set to that is not default. Debug log was not able to be enabled on the production system.

Modifications

Log improvement mostly

Verifying this change

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: no
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? no
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@@ -348,7 +348,7 @@ func (p *partitionProducer) internalSend(request *sendRequest) {
p.log.WithError(errMessageTooLarge).
WithField("size", len(payload)).
WithField("properties", msg.Properties).
Error()
Errorf("MaxMessageSize %d", int(p.cnx.GetMaxMessageSize()))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we keep this in a structured form instead?

Suggested change
Errorf("MaxMessageSize %d", int(p.cnx.GetMaxMessageSize()))
WithField("max-message-size", int(p.cnx.GetMaxMessageSize())).
Error()

Copy link
Contributor

@freeznet freeznet left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

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

LGTM +1

@wolfstudy wolfstudy merged commit 21bd87e into apache:master Mar 5, 2021
@wolfstudy wolfstudy added this to the 0.5.0 milestone Mar 5, 2021
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.

4 participants