Skip to content

Conversation

alexandrebrg
Copy link

@alexandrebrg alexandrebrg commented Aug 19, 2025

Motivation

We recently came with an issue where namespaces were reaching their limits, errors are lifted to producers and cannot be fixed by them (need either to delete topics or increase namespace limit). This PR creates a new metric to give topics limit for each namespace loaded in a broker. It will allow to correlate the current topic count (already existing metric) and the limit to determine the saturation of a namespace.

Modifications

  • Implement metric pulsar_namespace_max_topics_limit (labels are cluster and namespace)

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.

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:

Copy link

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

@github-actions github-actions bot added doc-required Your PR changes impact docs and you will update later. and removed doc-label-missing labels Aug 20, 2025
Signed-off-by: AlexandreBrg <alexandre.burgoni@clever-cloud.com>
@alexandrebrg alexandrebrg force-pushed the feat/add_ns_topic_limit_metric branch from 9e259d9 to 6d6487d Compare August 21, 2025 09:09
@alexandrebrg alexandrebrg marked this pull request as ready for review August 21, 2025 09:09
@dao-jun
Copy link
Member

dao-jun commented Aug 23, 2025

@alexandrebrg Thanks for your contribution!
But a metrics change needs a PIP, you can check the PIP progress there: https://github.com/apache/pulsar/blob/master/pip/README.md

By the way, could please add tests for the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required Your PR changes impact docs and you will update later.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants