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][broker] Fix memory leak when rebatchMessage #20369

Merged
merged 1 commit into from
May 24, 2023

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented May 23, 2023

Motivation

If there are no retained messages, the memory of brokerMeta will leak. It be introduced by #20337

Modifications

Retain brokerMeta when it really needs.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 23, 2023
@coderzc coderzc added type/bug The PR fixed a bug or issue reported a bug area/broker release/3.0.1 and removed doc-not-needed Your PR changes do not impact docs labels May 23, 2023
@coderzc coderzc added this to the 3.1.0 milestone May 23, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label May 23, 2023
@coderzc coderzc force-pushed the fix_leak_rebatchmessage branch from 8ec8c8f to 4e55e37 Compare May 23, 2023 01:08
@coderzc coderzc closed this May 23, 2023
@coderzc coderzc reopened this May 23, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #20369 (4e55e37) into master (b7f0004) will decrease coverage by 35.59%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #20369       +/-   ##
=============================================
- Coverage     72.42%   36.84%   -35.59%     
+ Complexity    31665    12044    -19621     
=============================================
  Files          1864     1687      -177     
  Lines        138384   128826     -9558     
  Branches      15183    14013     -1170     
=============================================
- Hits         100223    47460    -52763     
- Misses        30160    75096    +44936     
+ Partials       8001     6270     -1731     
Flag Coverage Δ
inttests 24.23% <0.00%> (?)
systests 24.93% <0.00%> (-0.16%) ⬇️
unittests 31.95% <0.00%> (-39.84%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...g/apache/pulsar/client/impl/RawBatchConverter.java 73.68% <0.00%> (-19.74%) ⬇️

... and 1437 files with indirect coverage changes

@lhotari lhotari merged commit f2ab623 into apache:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker doc-not-needed Your PR changes do not impact docs type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants