Skip to content

[fix][offload] Fix memory leak while Offloading ledgers - #18500

Merged
eolivelli merged 1 commit into
apache:masterfrom
eolivelli:impl/leak-offloaders
Nov 16, 2022
Merged

[fix][offload] Fix memory leak while Offloading ledgers#18500
eolivelli merged 1 commit into
apache:masterfrom
eolivelli:impl/leak-offloaders

Conversation

@eolivelli

Copy link
Copy Markdown
Contributor

Motivation

  • BlockAwareSegmentInputStreamImpl never releases the BookKeeper entries in the close method
  • This leads to OutOfDirectMemory errors on brokers that run frequently Offloading activity

Modifications

Fix the "if" condition.

Verifying this change

This change added tests

Documentation

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

- BlockAwareSegmentInputStreamImpl never releases the BookKeeper entries in the close method
@eolivelli eolivelli self-assigned this Nov 16, 2022
@eolivelli
eolivelli requested review from hangc0276 and zymap November 16, 2022 10:58
@eolivelli eolivelli added this to the 2.12.0 milestone Nov 16, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 16, 2022
@eolivelli eolivelli added release/2.11.0 ready-to-test and removed doc-not-needed Your PR changes do not impact docs labels Nov 16, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 16, 2022
@eolivelli
eolivelli requested a review from jiazhai November 16, 2022 11:03
@codecov-commenter

codecov-commenter commented Nov 16, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.93%. Comparing base (7975023) to head (a16e88c).
⚠️ Report is 3320 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18500      +/-   ##
============================================
+ Coverage     45.62%   46.93%   +1.31%     
- Complexity    10075    10395     +320     
============================================
  Files           697      697              
  Lines         68024    68028       +4     
  Branches       7293     7291       -2     
============================================
+ Hits          31033    31931     +898     
+ Misses        33413    32510     -903     
- Partials       3578     3587       +9     
Flag Coverage Δ
unittests 46.93% <100.00%> (+1.31%) ⬆️

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

Files with missing lines Coverage Δ
.../jcloud/impl/BlockAwareSegmentInputStreamImpl.java 59.06% <100.00%> (ø)

... and 76 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codelipenghui codelipenghui added type/bug The PR fixed a bug or issue reported a bug area/tieredstorage and removed release/2.9.0 labels Nov 16, 2022
@codelipenghui codelipenghui changed the title [fix] Fix memory leak while Offloading ledgers [fix][offload] Fix memory leak while Offloading ledgers Nov 16, 2022
@eolivelli
eolivelli merged commit 6ff7d45 into apache:master Nov 16, 2022
@eolivelli
eolivelli deleted the impl/leak-offloaders branch November 16, 2022 12:44
eolivelli added a commit that referenced this pull request Nov 16, 2022
eolivelli added a commit that referenced this pull request Nov 16, 2022
eolivelli added a commit that referenced this pull request Nov 16, 2022
eolivelli added a commit to datastax/pulsar that referenced this pull request Nov 16, 2022
@hangc0276

Copy link
Copy Markdown
Contributor

Nice catch!

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good work @eolivelli

@lhotari

lhotari commented Nov 16, 2022

Copy link
Copy Markdown
Member

Tagging #15063 since that's where the issue slipped in.

congbobo184 pushed a commit that referenced this pull request Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants