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

[Issue 8734][C++] Optimize batch message buffer allocation #8749

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

erobot
Copy link
Contributor

@erobot erobot commented Nov 30, 2020

Fixes #8734

Motivation

Batch message should reserve some buffers for subsequent messages. See #8734 for performance impact case.

Modifications

Double buffer size everytime when not enough room. For new size, use maxMessageSizeInBytes for max hint and current buffer size + requiredSpace for min.

Verifying this change

Can fix performance impact case of #8734.

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

  • 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)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@merlimat merlimat added component/c++ type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages labels Nov 30, 2020
@merlimat merlimat added this to the 2.8.0 milestone Nov 30, 2020
@sijie sijie merged commit dae2da5 into apache:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[C++] Batch message should reserve some buffers for subsequent messages
4 participants