Denovo1998 commented on PR #17449: URL: https://github.com/apache/pulsar/pull/17449#issuecomment-1311870001
> I think we should not check the schema compatibility for AUTO_CONSUME and AUTO_PUBLISH schema > > https://github.com/apache/pulsar/blob/fe1963988fc6883f52826069a781b91aba0405bf/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L1135 > > I think we should change to > > ```java > if (schema != null && schema.getType() != SchemaType.AUTO_PUBLISH && schema.getType() != SchemaType.AUTO_CONSUME) { > return topic.addSchemaIfIdleOrCheckCompatible(schema) > .thenCompose(v -> topic.subscribe(option)); > } else { > return topic.subscribe(option); > } > ``` > > What do you think @congbobo184 @liangyepianzhou This doesn't fix the bug that pr is trying to fix. For example, if the schema is AVRO, but two AUTO_CONSUME consumers have subscribed to the topic, the schema compatibility will still be checked. Because numActiveConsumers ! = 0 is true, so the active consumers shouldn't only include the AUTO_CONSUME consumers. Of course we should add your code, too. So I made some changes. @codelipenghui @liangyepianzhou @congbobo184 PTAL -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
