Thanks Yunze.  We should fix this issue, and add more accurate checks for
partitioned topic names. +1 to go ahead.

On Tue, Jun 8, 2021 at 4:38 PM Yunze Xu <y...@streamnative.io.invalid>
wrote:

> Hi all,
>
> Currently the Java implementation to get the partition index of a topic
> name
> is not correct. See
>
> https://github.com/apache/pulsar/pull/8341/files#diff-445b0cfa56ca0c784df78e73d9294f2a37f079ca3c15c345b03c09d56f81ebff
> <
> https://github.com/apache/pulsar/pull/8341/files#diff-445b0cfa56ca0c784df78e73d9294f2a37f079ca3c15c345b03c09d56f81ebff>
>
> for the unit tests I added.
>
> I also noticed the problem in https://github.com/apache/pulsar/pull/10850
> <https://github.com/apache/pulsar/pull/10850>
> because transaction buffer snapshot topic name may be
> `xxx-partition-0-yyy`,
> which should not be treated as a partitioned topic.
>
> Since Pulsar is 2.9.0-SNAPSHOT now, is it proper to correct the
> implementation?
> What I concerned is the compatibility because we can’t assume users never
> used
> a topic name like `my-topic-partition-000` to reference the partition 0 of
> `my-topic`. If the behavior was corrected, `my-topic-partition-000` would
> be
> treated as a non-partitioned topic.
>
> I'm not sure if this change could have a wide influence, so I want to
> begin a
> discussion about it.
>
> Thanks,
> Yunze

Reply via email to