Skip to content

[improve][cli] Add client side looping in "pulsar-admin topics analyze-backlog" cli to avoid potential HTTP call timeout - #25126

Merged
lhotari merged 22 commits into
apache:masterfrom
oneby-wang:pulsar_cli_client_side_analyze_backlog
Apr 27, 2026
Merged

[improve][cli] Add client side looping in "pulsar-admin topics analyze-backlog" cli to avoid potential HTTP call timeout#25126
lhotari merged 22 commits into
apache:masterfrom
oneby-wang:pulsar_cli_client_side_analyze_backlog

Conversation

@oneby-wang

@oneby-wang oneby-wang commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #25537

Motivation

Use client-side looping instead of increasing broker settings to avoid potential HTTP call timeout in "pulsar-admin topics analyze-backlog" cli.

Modifications

Add client-side looping, add test.

Verifying this change

  • Make sure that the change passes the CI checks.

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: oneby-wang#21

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Jan 6, 2026
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
@oneby-wang

oneby-wang commented Feb 5, 2026

Copy link
Copy Markdown
Contributor Author

@lhotari Could help me solve the above questions when you have a moment? Especially about how to write integration tests easily in admin CLI module.

I'll refactor this PR using the API that PR #25127 provided once I'm back.

@lhotari

lhotari commented Feb 6, 2026

Copy link
Copy Markdown
Member

@oneby-wang #25127 has been merged

@oneby-wang
oneby-wang force-pushed the pulsar_cli_client_side_analyze_backlog branch from b48e0eb to 83bdbf1 Compare February 6, 2026 11:56
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
@oneby-wang
oneby-wang force-pushed the pulsar_cli_client_side_analyze_backlog branch 3 times, most recently from 425e8bf to 941b50c Compare February 25, 2026 14:05
@oneby-wang
oneby-wang force-pushed the pulsar_cli_client_side_analyze_backlog branch from 717742a to 91001d3 Compare March 28, 2026 03:58
@oneby-wang
oneby-wang force-pushed the pulsar_cli_client_side_analyze_backlog branch from 91001d3 to 2456a05 Compare April 4, 2026 12:00
@oneby-wang
oneby-wang requested a review from lhotari April 6, 2026 05:03
@oneby-wang

Copy link
Copy Markdown
Contributor Author

Hi @lhotari, could you please help review this refactored PR?

Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated
Comment thread pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java Outdated

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

A few minor comments

@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 commented Apr 27, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution @oneby-wang

@lhotari
lhotari merged commit 13e1fac into apache:master Apr 27, 2026
43 checks passed
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request May 6, 2026
…e-backlog" cli to avoid potential HTTP call timeout (apache#25126)
Technoboy- pushed a commit that referenced this pull request May 11, 2026
…e-backlog" cli to avoid potential HTTP call timeout (#25126)
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.

[Enhancement] Add client side looping to "pulsar-admin topics analyze-backlog" cli command

3 participants