-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Conversation
run integration tests |
@jiazhai 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+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
fine with me. // run integration tests |
**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.
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.
**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)
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)
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
tonumPartitions > 0
expect all existing ut passed.