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][admin] Expose the offload threshold in seconds to the admin #22101

Merged

Conversation

zymap
Copy link
Member

@zymap zymap commented Feb 23, 2024


Fixes #xyz

Main Issue: #xyz

PIP: #xyz

Motivation

We have two configurations to trigger the offload automatically, time and bytes. We only expose the bytes in the admin but didn't expose the time in the admin. When we want to disable it, we need to set both of them to the -1. But we didn't expose the time settings, the offload will never be disabled.

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

We have two configurations to trigger the offload automatically,
time and bytes. We only expose the bytes in the admin but didn't
expose the time in the admin. When we want to disable it, we need
to set both of them to the -1. But we didn't expose the time settings,
the offload will never be disabled.
Copy link

@zymap Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

@Technoboy- Technoboy- added ready-to-test doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Feb 23, 2024
@Technoboy- Technoboy- closed this Feb 23, 2024
@Technoboy- Technoboy- reopened this Feb 23, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.58%. Comparing base (08058b9) to head (c76bb1e).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #22101       +/-   ##
=============================================
+ Coverage     36.89%   73.58%   +36.68%     
- Complexity    12161    32592    +20431     
=============================================
  Files          1734     1874      +140     
  Lines        132201   139354     +7153     
  Branches      14466    15279      +813     
=============================================
+ Hits          48770   102537    +53767     
+ Misses        76937    28909    -48028     
- Partials       6494     7908     +1414     
Flag Coverage Δ
inttests 24.61% <0.00%> (-0.07%) ⬇️
systests 24.38% <0.00%> (+0.05%) ⬆️
unittests 72.84% <100.00%> (+40.94%) ⬆️

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

Files Coverage Δ
...ava/org/apache/pulsar/admin/cli/CmdNamespaces.java 78.73% <100.00%> (+78.73%) ⬆️

... and 1440 files with indirect coverage changes

@heesung-sn
Copy link
Contributor

This PR depends on TimeUnitToSecondsConverter, which has not been cherry-picked to branch-3.0.

#20782

@heesung-sn
Copy link
Contributor

We are reverting this commit from branch-3.0.

@heesung-sn
Copy link
Contributor

heesung-sn commented Feb 29, 2024

@zymap Plz raise another PR to branch-3.0 without relying on TimeUnitToSecondsConverter(because TimeUnitToSecondsConverter is not available in branch-3.0), if possible. (targeting release 3.0.4)

zymap added a commit to zymap/pulsar that referenced this pull request Mar 1, 2024
@zymap
Copy link
Member Author

zymap commented Mar 1, 2024

#22169 a new PR to branch-3.0 @heesung-sn

mukesh154 pushed a commit to cognitree/pulsar that referenced this pull request Mar 1, 2024
@heesung-sn heesung-sn changed the title [improve][admin] Expose the offload threshold in seconds to the amdin [improve][admin] Expose the offload threshold in seconds to the admin Mar 1, 2024
gaoran10 added a commit that referenced this pull request Mar 4, 2024
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.

7 participants