If we are going to create a flag named "enableStrictTopicName", we
should discuss more requirements on topic names than just
"partitioned".

At the moment, topic names are not validated using the `NamedEntity`
class's this logic [0]. Enabling stricting topic names should enable
this validation call. We already run this validation on tenant and
namespace names.

Further, I think we should reserve topics that start with __ for
system topics. In this case, we still need a way to create these
topics, so it would be sufficient to let super users create these
topics.

If we keep the scope as is, I don't think we should introduce this feature flag.

Thanks,
Michael

[0] 
https://github.com/apache/pulsar/blob/82237d3684fe506bcb6426b3b23f413422e6e4fb/pulsar-common/src/main/java/org/apache/pulsar/common/naming/NamedEntity.java#L28-L41

On Mon, Jan 30, 2023 at 3:26 PM Nicolò Boschi <boschi1...@gmail.com> wrote:
>
> +1 for going with default = true in the next release (3.0/2.12)
>
> Nicolò Boschi
>
>
> Il giorno lun 30 gen 2023 alle ore 05:31 <mattisonc...@gmail.com> ha
> scritto:
>
> > Hi,  Asaf, Yunze
> > > You mean to say, if the topic is partitioned, the word "partition" can
> > notappear in the submitted topic name, in the topic creation API?
> > It's a little bit confusing. I will give some examples to help explain:
> >
> > Create a topic:
> >
> > • no corresponding partitioned topic
> >     • persistent://public/default/local-name (passed)
> >     • persistent://public/default/local-name-partition-z (rejected by
> > keyword)
> >     • persistent://public/default/local-name-partition-0 (rejected by
> > keyword)
> > • Has corresponding partitioned topic, partitions=2 and topic partition
> > name is persistent://public/default/local-name
> >     • persistent://public/default/local-name-partition-0 (passed, Because
> > it is the partition topic's sub-partition)
> >     • persistent://public/default/local-name-partition-z (rejected by
> > keyword)
> >     • persistent://public/default/local-name-partition-4 (rejected,
> > Because it exceeds the number of maximum partitions)
> >
> >
> > Create a partitioned topic(topic metadata)
> >
> > • persistent://public/default/local-name (passed)
> > • persistent://public/default/local-name-partition-z (rejected by keyword)
> > • persistent://public/default/local-name-partition-0 (rejected by keyword)
> >
> > > I think this PIP should go close to this end to end, meaning the last
> > stepbeing making it default true.Otherwise, we end up having so many
> > "feature flags" turned off, it's hardto navigate and improve Pulsar.
> > Yes, we will add a warning log-in step 3 at the current release and enable
> > it by default in the next major release(3.0?).
> >
> > Thanks a lot!
> >
> > Best,
> > Mattison
> > On Jan 30, 2023, 00:17 +0800, Asaf Mesika <asaf.mes...@gmail.com>, wrote:
> > > You mean to say, if the topic is partitioned, the word "partition" can
> > not appear in the submitted topic name, in the topic creation API?
> >

Reply via email to