pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][broker] Don't allow creating a non-persistent partitioned topic with '-partition-' in name

Open hanmz opened this issue 1 year ago • 6 comments

Motivation

Currently, we can create a non-persistent partition topic contain -partition-. However, we cannot use it as a normal non-persistent partition topic. For example, when we use the partitioned-stats command, we will encounter errors.

Partitioned Topic Name should not contain '-partition-' Reason: Partitioned Topic Name should not contain '-partition-'

Modifications

We should disable the creation of non-persistent partition topics contain -partition-.

Documentation

Verifying this change

All unit tests passed, not have any behavior change.

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

hanmz avatar Oct 21 '24 08:10 hanmz

Thanks for the contribution, @hanmz. Would you be able to add a test case to cover this change?

lhotari avatar Oct 21 '24 13:10 lhotari

Thanks for the contribution, @hanmz. Would you be able to add a test case to cover this change?

OK, I've added a test case.

hanmz avatar Oct 28 '24 08:10 hanmz

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.75%. Comparing base (bbc6224) to head (fbe1f32). Report is 793 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (bbc6224) and HEAD (fbe1f32). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (bbc6224) HEAD (fbe1f32)
unittests 2 1
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #23488       +/-   ##
=============================================
- Coverage     73.57%   40.75%   -32.83%     
+ Complexity    32624     1417    -31207     
=============================================
  Files          1877     1805       -72     
  Lines        139502   148024     +8522     
  Branches      15299    17116     +1817     
=============================================
- Hits         102638    60322    -42316     
- Misses        28908    80090    +51182     
+ Partials       7956     7612      -344     
Flag Coverage Δ
inttests 27.24% <100.00%> (+2.66%) :arrow_up:
systests 24.34% <0.00%> (+0.01%) :arrow_up:
unittests 36.03% <100.00%> (-36.81%) :arrow_down:

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

Files with missing lines Coverage Δ
...he/pulsar/broker/admin/v2/NonPersistentTopics.java 29.20% <100.00%> (-32.27%) :arrow_down:

... and 1577 files with indirect coverage changes

codecov-commenter avatar Oct 29 '24 04:10 codecov-commenter

Closing and reopening to trigger a new CI run

lhotari avatar Nov 05 '24 20:11 lhotari

/pulsarbot rerun-failure-checks

hanmz avatar Dec 09 '24 07:12 hanmz

reopen to trigger ci

Jason918 avatar Dec 16 '24 11:12 Jason918