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

[improve][broker] Reduce memory occupation of InMemoryRedeliveryTracker. #23640

Conversation

thetumbled
Copy link
Member

@thetumbled thetumbled commented Nov 26, 2024

Motivation

Reduce memory occupation of the InMemoryRedeliveryTracker.

Modifications

Use Long2ObjectMap<Long2IntMap> to replace ConcurrentLongLongPairHashMap.

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.

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

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

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

Matching PR in forked repository

PR in forked repository: thetumbled#66

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM, good work @thetumbled

@lhotari lhotari added this to the 4.1.0 milestone Nov 27, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 63.15789% with 14 lines in your changes missing coverage. Please review.

Project coverage is 74.34%. Comparing base (bbc6224) to head (c37e605).
Report is 751 commits behind head on master.

Files with missing lines Patch % Lines
...lsar/broker/service/InMemoryRedeliveryTracker.java 63.15% 12 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23640      +/-   ##
============================================
+ Coverage     73.57%   74.34%   +0.76%     
- Complexity    32624    34997    +2373     
============================================
  Files          1877     1944      +67     
  Lines        139502   147224    +7722     
  Branches      15299    16246     +947     
============================================
+ Hits         102638   109453    +6815     
- Misses        28908    29322     +414     
- Partials       7956     8449     +493     
Flag Coverage Δ
inttests 27.22% <34.21%> (+2.63%) ⬆️
systests 24.29% <63.15%> (-0.03%) ⬇️
unittests 73.73% <63.15%> (+0.88%) ⬆️

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

Files with missing lines Coverage Δ
...lsar/broker/service/InMemoryRedeliveryTracker.java 65.11% <63.15%> (-30.13%) ⬇️

... and 660 files with indirect coverage changes

@lhotari lhotari merged commit 6b694f6 into apache:master Nov 27, 2024
58 checks passed
lhotari pushed a commit that referenced this pull request Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants