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] Do not retain the data in the system topic #22022

Merged
merged 5 commits into from
Feb 6, 2024

Conversation

liangyepianzhou
Copy link
Contributor

Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to -1). But the data in the system topic does not need for infinite retention.

Modifications

For system topics, do not retain messages that have already been acknowledged.

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:

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Feb 4, 2024
@poorbarcode
Copy link
Contributor

@liangyepianzhou

Could you add the labels that indicate which branches this PR should be cherry-picked into? And set a Milestone?

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a702e5a) 73.48% compared to head (848ceea) 73.65%.
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #22022      +/-   ##
============================================
+ Coverage     73.48%   73.65%   +0.16%     
- Complexity    32465    32496      +31     
============================================
  Files          1863     1863              
  Lines        138812   138820       +8     
  Branches      15215    15219       +4     
============================================
+ Hits         102003   102244     +241     
+ Misses        28921    28670     -251     
- Partials       7888     7906      +18     
Flag Coverage Δ
inttests 24.09% <75.00%> (?)
systests 24.03% <75.00%> (+0.13%) ⬆️
unittests 72.94% <75.00%> (+0.06%) ⬆️

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

Files Coverage Δ
...apache/bookkeeper/mledger/ManagedLedgerConfig.java 96.29% <100.00%> (ø)
...rg/apache/pulsar/broker/service/BrokerService.java 81.17% <71.42%> (-0.02%) ⬇️

... and 82 files with indirect coverage changes

…rokerService.java

Co-authored-by: Penghui Li <penghui@apache.org>
@BewareMyPower BewareMyPower changed the title [improve][broker] Do not retain the data in the system topic [improve][broker] Do not retain the data infinitely in the system topic Feb 5, 2024
@BewareMyPower BewareMyPower changed the title [improve][broker] Do not retain the data infinitely in the system topic [improve][broker] Do not retain the data in the system topic Feb 5, 2024
@liangyepianzhou liangyepianzhou merged commit 5df97b4 into apache:master Feb 6, 2024
47 of 49 checks passed
liangyepianzhou added a commit to liangyepianzhou/pulsar that referenced this pull request Feb 6, 2024
…opic (apache#22022)

### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention.

### Modifications

For system topics, do not retain messages that have already been acknowledged.
Technoboy- pushed a commit that referenced this pull request Feb 20, 2024
### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention. 

### Modifications

For system topics, do not retain messages that have already been acknowledged.
Technoboy- pushed a commit that referenced this pull request Feb 22, 2024
### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention. 

### Modifications

For system topics, do not retain messages that have already been acknowledged.
Technoboy- pushed a commit that referenced this pull request Feb 27, 2024
### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention. 

### Modifications

For system topics, do not retain messages that have already been acknowledged.
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 1, 2024
…22022)

### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention.

### Modifications

For system topics, do not retain messages that have already been acknowledged.

(cherry picked from commit 4e97827)
mukesh-ctds pushed a commit to datastax/pulsar that referenced this pull request Mar 6, 2024
…22022)

### Motivation

For some use case, the users need to store all the messages even though these message are acked by all subscription.
So they set the retention policy of the namespace to infinite retention (setting both time and size limits to `-1`).  But the data in the system topic does not need for infinite retention.

### Modifications

For system topics, do not retain messages that have already been acknowledged.

(cherry picked from commit 4e97827)
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.

8 participants