Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 5903] Support compact all partitions of a partitioned topic #6537

Merged
merged 2 commits into from
Mar 19, 2020

Conversation

murong00
Copy link
Contributor

@murong00 murong00 commented Mar 14, 2020

Motivation

Fixes #5903

If there is a partitioned topic with too many partitions, users need to compact one by one.

Modifications

Async method triggerCompaction and support to compact on a partitioned topic.

verify(response, timeout(5000).times(1)).resume(responseCaptor.capture());
Assert.assertEquals(responseCaptor.getValue().getStatus(), Response.Status.NO_CONTENT.getStatusCode());

// create partitioned topic and compaction on it
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@murong00 thanks for the contribute, Would you please help add a test that really called into and execute the compact? Seems this is only the top level method call, and not called into the methods, and some of the code in PersistentTopicsBase.java seems not covered.
If there is no ut framework for this, we could add a integration test for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a unit test to cover the compact logic and just keep this top level method call test.

@murong00
Copy link
Contributor Author

@jiazhai I hava added a unit test to cover the compact logic, please help to take a look.

@sijie sijie added this to the 2.6.0 milestone Mar 18, 2020
@murong00
Copy link
Contributor Author

/pulsarbot run-failure-checks

@sijie sijie merged commit 9634eb7 into apache:master Mar 19, 2020
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this pull request Aug 24, 2020
…pache#6537)

* Resolve conflict.

* Add a unit test to cover the compact logic.
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.

[pulsar-broker][REST-API] Support compact all partitions of a partitioned topic
3 participants