You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "BewareMyPower (via GitHub)" <gi...@apache.org> on 2025/07/25 08:46:40 UTC
[PR] [fix][broker] Fix maxTopicsPerNamespace might report a false failure [pulsar]
BewareMyPower opened a new pull request, #24560:
URL: https://github.com/apache/pulsar/pull/24560
### Motivation
The `createIfMissing` argument only represents the topic can be created automatically when it does not exist, but it might not trigger the topic creation in this `getTopic` call. Hence, we cannot simply pass 1 as the 2nd argument here: https://github.com/apache/pulsar/blob/d95cf3f34f34e8de2d3605374374a028c3e38853/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L1790
Assuming `maxTopicsPerNamespace` is 10, then the following two cases will both fail.
Case 1:
```bash
> admin topics create-partitioned-topic my-topic -p 10
> client produce -m msg my-topic
```
Case 2:
```bash
> admin topics create-partitioned-topic dummy -p 9
> admin topics create my-topic
> admin topics unload my-topic
> client produce -m msg my-topic
```
### Modifications
Add an overload of `checkMaxTopicsPerNamespace`, which verifies if the topic exists first. Only call the other overload when the topic does not exist. In `createPersistentTopic0`, call this new overload. Improve `testMaxTopicsPerNamespace` to verify this change.
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: <!-- ENTER URL HERE -->
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][broker] Fix maxTopicsPerNamespace might report a false failure [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #24560:
URL: https://github.com/apache/pulsar/pull/24560#issuecomment-3117739758
I see 4.0.6 has not started the release, change the release label to 4.0.6
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][broker] Fix maxTopicsPerNamespace might report a false failure [pulsar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24560:
URL: https://github.com/apache/pulsar/pull/24560#issuecomment-3117213891
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/24560?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 74.33%. Comparing base [(`bbc6224`)](https://app.codecov.io/gh/apache/pulsar/commit/bbc62245c5ddba1de4b1e7cee4ab49334bc36277?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`8ad9646`)](https://app.codecov.io/gh/apache/pulsar/commit/8ad964690f74d8fe241e33817e962e361c5145c4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 1225 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/pulsar/pull/24560?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #24560 +/- ##
============================================
+ Coverage 73.57% 74.33% +0.76%
- Complexity 32624 32973 +349
============================================
Files 1877 1876 -1
Lines 139502 146276 +6774
Branches 15299 16774 +1475
============================================
+ Hits 102638 108739 +6101
+ Misses 28908 28899 -9
- Partials 7956 8638 +682
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/24560/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/24560/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.87% <60.00%> (+2.29%)` | :arrow_up: |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/24560/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `23.32% <60.00%> (-1.00%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/24560/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.82% <100.00%> (+0.97%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/24560?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...rg/apache/pulsar/broker/service/BrokerService.java](https://app.codecov.io/gh/apache/pulsar/pull/24560?src=pr&el=tree&filepath=pulsar-broker%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fbroker%2Fservice%2FBrokerService.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL0Jyb2tlclNlcnZpY2UuamF2YQ==) | `84.08% <100.00%> (+3.30%)` | :arrow_up: |
... and [1108 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/24560/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [fix][broker] Fix maxTopicsPerNamespace might report a false failure [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower merged PR #24560:
URL: https://github.com/apache/pulsar/pull/24560
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org