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

[Broker] Prevent carrying state of PositionImplRecyclable when recycled #10404

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Apr 27, 2021

Motivation

When reviewing the state management of some recycled instances, I came across an issue in PositionImplRecyclable where the ackSet field is not cleared when reused. It is unclear what the impact of this inconsistency is.
PositionImplRecyclable is used in ManagedCursorImpl's recyclePositionRangeConverter.

Modifications

  • clear the ackSet field before and after reusing a PositionImplRecyclable instance.
  • add a unit test that reproduced the issue before the fix

@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 27, 2021
@merlimat merlimat added this to the 2.8.0 milestone Apr 27, 2021
@merlimat merlimat merged commit 2daa8c0 into apache:master Apr 27, 2021
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.

None yet

2 participants