You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/18 20:05:14 UTC

[GitHub] [pulsar] ta1meng edited a comment on issue #9571: Avro schema incompatible with schema upload vs python producer

ta1meng edited a comment on issue #9571:
URL: https://github.com/apache/pulsar/issues/9571#issuecomment-781602346


   This might be a duplicate of https://github.com/apache/pulsar/issues/8510.
   
   I ran into the same issues using the Java client. 
   
   Issue 1: I believe that the above two schema versions are not identical. They likely contain a whitespace difference. Unfortunately, Pulsar seems to consider two schema definitions that differ by whitespace different, and compatible.
   
   Issue 2: your policies may be set incorrectly. When set correctly, the producer should not modify the schema of the topic. The producer should be disconnected from Pulsar when its schema is different from a topic's schema.
   
   Below are how I set the policies:
   
   `bin/pulsar-admin namespaces set-is-allow-auto-update-schema --disable <tenant/namespace>
   
   bin/pulsar-admin namespaces set-schema-compatibility-strategy  <tenant/namespace> --compatibility FORWARD_TRANSITIVE
   
   bin/pulsar-admin namespaces set-schema-validation-enforce --enable  <tenant/namespace>
   
   bin/pulsar-admin namespaces set-schema-autoupdate-strategy  <tenant/namespace> --disabled`
   
   The schema related policies for my namespace look like:
   
   `bin/pulsar-admin namespaces policies <tenant/namespace>`
   
   `"schema_auto_update_compatibility_strategy" : "AutoUpdateDisabled",
     "schema_compatibility_strategy" : "FORWARD_TRANSITIVE",
     "is_allow_auto_update_schema" : false,
     "schema_validation_enforced" : true`
   
   If the suggestion above works for you, please mark this ticket a duplicate of https://github.com/apache/pulsar/issues/8510.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org