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

Allow to create partitioned topic with 1 partition #4764

Merged
merged 2 commits into from
Jul 21, 2019

Conversation

jiazhai
Copy link
Member

@jiazhai jiazhai commented Jul 19, 2019

Motivation
when create partitioned topic, there is a check that numPartitions > 1, if numPartitions==1, it will fail.
Some user may want to create partitioned topic with only 1 topic at the start time, and during using it, could update to more topics later.

Modification
change check of numPartitions > 1 to numPartitions > 0

expect all existing ut passed.

@jiazhai jiazhai added this to the 2.5.0 milestone Jul 19, 2019
@jiazhai
Copy link
Member Author

jiazhai commented Jul 19, 2019

run integration tests

@jiazhai jiazhai closed this Jul 19, 2019
@jiazhai jiazhai reopened this Jul 19, 2019
@sijie
Copy link
Member

sijie commented Jul 19, 2019

@jiazhai I think this is a behavior change. Can you just write a PIP for recording this change?

@merlimat
Copy link
Contributor

I think this is a behavior change. Can you just write a PIP for recording this change?

I think it should be fine as it shouldn't break any existing behavior.

Eg.: before you could only create partitioned topics with 2+ partitions, now it will work with 1+

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍

@sijie
Copy link
Member

sijie commented Jul 20, 2019

I think it should be fine as it shouldn't break any existing behavior

fine with me.

// run integration tests

@sijie sijie merged commit 5162393 into apache:master Jul 21, 2019
easyfan pushed a commit to easyfan/pulsar that referenced this pull request Jul 26, 2019
**Motivation**
when create partitioned topic, there is a check that `numPartitions > 1`, if numPartitions==1, it will fail.
Some user may want to create partitioned topic with only 1 topic at the start time, and during using it, could update to more topics later. 

**Modification**
change check of `numPartitions > 1` to `numPartitions > 0`

expect all existing ut passed.
@jiazhai jiazhai modified the milestones: 2.5.0, 2.4.1 Aug 4, 2019
jiazhai added a commit that referenced this pull request Aug 6, 2019
Motivation
In PR #4764, we allow to create partitioned topic with 1 partition, But in Pulsar Client, user still not able to do it.
This fix try to make sure user could create consumer/producer for 1 partitioned topic .

Modifications
- old and new added unit test passed.
jiazhai added a commit that referenced this pull request Aug 28, 2019
**Motivation**
when create partitioned topic, there is a check that `numPartitions > 1`, if numPartitions==1, it will fail.
Some user may want to create partitioned topic with only 1 topic at the start time, and during using it, could update to more topics later.

**Modification**
change check of `numPartitions > 1` to `numPartitions > 0`

expect all existing ut passed.
(cherry picked from commit 5162393)
jiazhai added a commit that referenced this pull request Aug 28, 2019
Motivation
In PR #4764, we allow to create partitioned topic with 1 partition, But in Pulsar Client, user still not able to do it.
This fix try to make sure user could create consumer/producer for 1 partitioned topic .

Modifications
- old and new added unit test passed.
(cherry picked from commit 128287e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants