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][offload] Create offload resources lazily #20775

Merged
merged 1 commit into from Jul 13, 2023

Conversation

zymap
Copy link
Member

@zymap zymap commented Jul 11, 2023

Fixes #xyz

Main Issue: #xyz

PIP: #xyz

Motivation

When creating a topic, it will create the offload resources. The offload resources are only used when the offload is triggered. When the broker restarts, there have a lot of topics loading.
Create offload blobstore lazily to avoid creating too many resources when the broker restarts.

Modifications

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

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:

---

### Motivation

When create a topic, it will create the offload resources. The offload
resources only used when the offload triggered. When the broker restarting,
there have a lot of topics are loading.
Create offload blobstore lazilyto avoid creating too much resources when the
broker restarting.
@zymap zymap added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/tieredstorage ready-to-test labels Jul 11, 2023
@zymap zymap self-assigned this Jul 11, 2023
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jul 11, 2023
@zymap zymap added this to the 3.1.0 milestone Jul 11, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #20775 (9e4d1cf) into master (e96b339) will increase coverage by 39.71%.
The diff coverage is 91.66%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #20775       +/-   ##
=============================================
+ Coverage     33.44%   73.15%   +39.71%     
- Complexity    12097    32142    +20045     
=============================================
  Files          1612     1866      +254     
  Lines        126568   139030    +12462     
  Branches      13824    15295     +1471     
=============================================
+ Hits          42328   101707    +59379     
+ Misses        78686    29273    -49413     
- Partials       5554     8050     +2496     
Flag Coverage Δ
inttests 24.11% <ø> (+0.02%) ⬆️
systests 24.98% <ø> (?)
unittests 72.43% <91.66%> (+40.48%) ⬆️

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

Impacted Files Coverage Δ
...d/jcloud/impl/BlobStoreManagedLedgerOffloader.java 75.18% <91.66%> (ø)

... and 1518 files with indirect coverage changes

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

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

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tieredstorage cherry-picked/branch-2.11 cherry-picked/branch-3.0 doc-not-needed Your PR changes do not impact docs ready-to-test release/2.11.3 release/3.0.2 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

4 participants