I pushed a PR: https://github.com/apache/pulsar/pull/18594

Thanks,
Yunze

On Fri, Nov 18, 2022 at 12:17 PM Yunze Xu <y...@streamnative.io> wrote:
>
> I've investigated more on this issue. The `allowAutoTopicCreationType`
> config introduced in https://github.com/apache/pulsar/pull/4963 also
> brings an incompatibility but it's not serious.
>
> I ran a standalone of Pulsar 2.5.0 (need to use JDK 8) with the
> following config:
>
> ```
> allowAutoTopicCreationType=partitioned
> ```
>
> Then I ran Pulsar client 2.5.0 and 2.4.0 to produce messages to topics
> that does not exist (with "http://localhost:8080"; as the service url),
> then list the topics:
>
> ```
> "persistent://public/default/topic-2.4.0"
> "persistent://public/default/topic-2.5.0-partition-0"
> ```
>
> The `allowAutoTopicCreationType` doesn't work for clients affected by
> the breaking change of #10601 and could bring unexpected behavior
> while a higher version (>= 2.5.0) client serves a automatically
> created topic by lower version clients (< 2.5.0).
>
> If `allowAutoTopicCreationForLegacyClients` is true, we should make
> the behavior consistent.
>
> Thanks,
> Yunze
>
> On Fri, Nov 18, 2022 at 12:02 PM Yunze Xu <y...@streamnative.io> wrote:
> >
> > Hi all,
> >
> > There is a breaking change for old version clients when using HTTP
> > lookup, see details in discussion here[1]. The affected clients I know
> > are:
> > - Java client 2.4.1 or earlier
> > - C++/Python clients 2.8.0 or earlier
> >
> > In short, #10601 changed the behavior for querying the partition
> > metadata of a topic that does not exist.
> > - Before: returns 0
> > - After: return a TopicNotFound error, this could differ between a
> > non-partitioned topic and a topic that does not exist.
> >
> > Since the new getPartitionedTopicMetadata semantics have already been
> > used for all recent active releases (2.8 to now), it's better not to
> > revert #10601. Instead, I'd like to add a config to keep compatibility
> > for legacy clients.
> >
> > ```bash
> > allowAutoTopicCreationForLegacyClients=false
> > ```
> >
> > If it's true, the legacy clients should be supported.
> >
> > [1] https://github.com/apache/pulsar/pull/10601#issuecomment-1319501354
> >
> > Thanks,
> > Yunze

Reply via email to