Skip to content

[feat][broker] add topic-level subscription expiration time policy - #25258

Merged
lhotari merged 4 commits into
apache:masterfrom
codelipenghui:penghui/topic-policy-subscription-expiration-time
Feb 26, 2026
Merged

[feat][broker] add topic-level subscription expiration time policy#25258
lhotari merged 4 commits into
apache:masterfrom
codelipenghui:penghui/topic-policy-subscription-expiration-time

Conversation

@codelipenghui

@codelipenghui codelipenghui commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Motivation:

Add topic-level override support for subscription expiration time on TopicPolicies. Changes: admin API/client methods, broker hierarchy cache wiring, v2 topic policy endpoints, runtime effective-value lookup for inactive subscription cleanup, topicPolicies CLI commands, and comprehensive tests for precedence/authz/disable/cli coverage.

Testing

focused compile passed and focused new/updated tests passed.

Documentation

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

@github-actions

Copy link
Copy Markdown

@codelipenghui 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 -->

@codelipenghui codelipenghui self-assigned this Feb 25, 2026
@codelipenghui codelipenghui added ready-to-test area/broker type/feature The PR added a new feature or issue requested a new feature and removed doc-label-missing labels Feb 25, 2026
@codelipenghui codelipenghui modified the milestones: 5.0.0, 4.2.0 Feb 25, 2026
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Feb 25, 2026
@codelipenghui codelipenghui changed the title Add topic-level subscription expiration time policy [feat][broker] add topic-level subscription expiration time policy Feb 25, 2026
@codecov-commenter

codecov-commenter commented Feb 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.87755% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.65%. Comparing base (82fcb18) to head (b7d6691).
⚠️ Report is 114 commits behind head on master.

Files with missing lines Patch % Lines
...ulsar/client/admin/internal/TopicPoliciesImpl.java 79.16% 5 Missing ⚠️
...che/pulsar/common/policies/data/TopicPolicies.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #25258       +/-   ##
=============================================
+ Coverage     37.64%   72.65%   +35.00%     
- Complexity    13387    34048    +20661     
=============================================
  Files          1902     1959       +57     
  Lines        151239   155502     +4263     
  Branches      17240    17731      +491     
=============================================
+ Hits          56939   112975    +56036     
+ Misses        86586    33520    -53066     
- Partials       7714     9007     +1293     
Flag Coverage Δ
inttests 25.88% <9.18%> (+0.01%) ⬆️
systests 22.32% <7.14%> (-0.15%) ⬇️
unittests 73.63% <93.87%> (+39.24%) ⬆️

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

Files with missing lines Coverage Δ
...pulsar/broker/admin/impl/PersistentTopicsBase.java 69.81% <100.00%> (+58.27%) ⬆️
...pache/pulsar/broker/admin/v2/PersistentTopics.java 87.79% <100.00%> (+75.57%) ⬆️
...rg/apache/pulsar/broker/service/AbstractTopic.java 88.53% <100.00%> (+22.64%) ⬆️
...sar/broker/service/persistent/PersistentTopic.java 80.14% <100.00%> (+30.11%) ⬆️
.../org/apache/pulsar/client/admin/TopicPolicies.java 100.00% <ø> (+100.00%) ⬆️
.../org/apache/pulsar/admin/cli/CmdTopicPolicies.java 88.55% <100.00%> (+88.55%) ⬆️
...r/common/policies/data/HierarchyTopicPolicies.java 100.00% <100.00%> (ø)
...che/pulsar/common/policies/data/TopicPolicies.java 54.79% <0.00%> (+33.96%) ⬆️
...ulsar/client/admin/internal/TopicPoliciesImpl.java 94.34% <79.16%> (+89.03%) ⬆️

... and 1407 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.

@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.

LGTM

@lhotari
lhotari merged commit c27ec7d into apache:master Feb 26, 2026
98 of 102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs ready-to-test type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants