Skip to content

[Admin CLI]Add admin rest endpoint/CLI to trim ledgers for a topic upon given position. - #9929

Closed
MarvinCai wants to merge 4 commits into
apache:masterfrom
MarvinCai:zxc/truncate-topic
Closed

[Admin CLI]Add admin rest endpoint/CLI to trim ledgers for a topic upon given position.#9929
MarvinCai wants to merge 4 commits into
apache:masterfrom
MarvinCai:zxc/truncate-topic

Conversation

@MarvinCai

Copy link
Copy Markdown
Contributor

Fixes #2736

Motivation

Able to set infinite retention on a namespace and then manually truncate the topic.

Modifications

In ManagedLedgerImpl, expose api to delete ledger upon given position.
Add Admin rest endpoint and CLI for this functionality.

Verifying this change

This change added tests and can be verified as follows:

  • Added unit test to verify topic trimming work as expected.

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: yes
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no
  • The rest endpoints: yes
  • The admin cli options: yes
  • Anything that affects deployment: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs / JavaDocs

@MarvinCai

Copy link
Copy Markdown
Contributor Author

@sijie Please take a look.

@codelipenghui codelipenghui modified the milestones: 2.8.0, 2.9.0 May 21, 2021
@eolivelli eolivelli modified the milestones: 2.9.0, 2.10.0 Oct 6, 2021
@codelipenghui codelipenghui modified the milestones: 2.10.0, 2.11.0 Jan 18, 2022
@codelipenghui

Copy link
Copy Markdown
Contributor

The pr had no activity for 30 days, mark with Stale label.

@github-actions

github-actions Bot commented Mar 4, 2022

Copy link
Copy Markdown

@MarvinCai:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@tisonkun

Copy link
Copy Markdown
Member

The issue to be fixed was fixed by #10326.

@tisonkun tisonkun closed this Dec 10, 2022
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.

Add admin command to truncate pulsar topics (partitions)

5 participants