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

MINOR: Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN in ProducerStateEntry #18991

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

dao-jun
Copy link
Member

@dao-jun dao-jun commented Feb 21, 2025

The default init size of ArrayDeque is 16+1, but we only need NUM_BATCHES_TO_RETAIN(default 5).
Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN to optimize memory usage

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@dao-jun dao-jun changed the title Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN in ProducerStateEntry [MINOR]Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN in ProducerStateEntry Feb 21, 2025
@github-actions github-actions bot added storage Pull requests that target the storage module small Small PRs labels Feb 21, 2025
Copy link
Contributor

@m1a2st m1a2st left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks for this PR, LGTM

@dao-jun dao-jun changed the title [MINOR]Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN in ProducerStateEntry MINOR: Specify ArrayDeque init size to NUM_BATCHES_TO_RETAIN in ProducerStateEntry Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small Small PRs storage Pull requests that target the storage module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants