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 2019/09/19 20:38:59 UTC

[GitHub] [pulsar] pouledodue opened a new issue #5231: schema scheme BACKWARD should permit new fields

pouledodue opened a new issue #5231: schema scheme BACKWARD should permit new fields
URL: https://github.com/apache/pulsar/issues/5231
 
 
   **Describe the bug**
   With schema scheme set to `backward` I should be able to upload a new schema containing a new field.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   I wrote a small script:
   [schema_test.sh.txt](https://github.com/apache/pulsar/files/3633093/schema_test.sh.txt)
   
   **Expected behavior**
   updated schema should contain `lakitu`
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - macOS Catalina, 
    - docker -> pulsar:2.4.1 in standalone mode
   
   ** Stack trace
   ```
   20:30:16.429 [ForkJoinPool.commonPool-worker-1] ERROR org.apache.pulsar.broker.service.schema.AvroSchemaBasedCompatibilityCheck - Error during schema compatibility check: Unable to read schema:
   {
     "type" : "record",
     "name" : "ZSchema",
     "fields" : [ {
       "name" : "goumba",
       "type" : "string"
     }, {
       "name" : "yoshi",
       "type" : "string"
     } ]
   }
   using schema:
   {
     "type" : "record",
     "name" : "ZSchema",
     "fields" : [ {
       "name" : "goumba",
       "type" : "string"
     }, {
       "name" : "yoshi",
       "type" : "string"
     }, {
       "name" : "lakitu",
       "type" : "string"
     } ]
   }
   org.apache.avro.SchemaValidationException: Unable to read schema:
   {
     "type" : "record",
     "name" : "ZSchema",
     "fields" : [ {
       "name" : "goumba",
       "type" : "string"
     }, {
       "name" : "yoshi",
       "type" : "string"
     } ]
   }
   using schema:
   {
     "type" : "record",
     "name" : "ZSchema",
     "fields" : [ {
       "name" : "goumba",
       "type" : "string"
     }, {
       "name" : "yoshi",
       "type" : "string"
     }, {
       "name" : "lakitu",
       "type" : "string"
     } ]
   }
   	at org.apache.avro.ValidateMutualRead.canRead(ValidateMutualRead.java:70) ~[org.apache.avro-avro-1.8.2.jar:1.8.2]
   	at org.apache.avro.ValidateMutualRead.validate(ValidateMutualRead.java:44) ~[org.apache.avro-avro-1.8.2.jar:1.8.2]
   	at org.apache.avro.ValidateLatest.validate(ValidateLatest.java:51) ~[org.apache.avro-avro-1.8.2.jar:1.8.2]
   	at org.apache.pulsar.broker.service.schema.AvroSchemaBasedCompatibilityCheck.isCompatible(AvroSchemaBasedCompatibilityCheck.java:56) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at org.apache.pulsar.broker.service.schema.AvroSchemaCompatibilityCheck.isCompatible(AvroSchemaCompatibilityCheck.java:26) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at org.apache.pulsar.broker.service.schema.AvroSchemaBasedCompatibilityCheck.isCompatible(AvroSchemaBasedCompatibilityCheck.java:42) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at org.apache.pulsar.broker.service.schema.AvroSchemaCompatibilityCheck.isCompatible(AvroSchemaCompatibilityCheck.java:26) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl.isCompatible(SchemaRegistryServiceImpl.java:220) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl.lambda$checkCompatibilityWithLatest$14(SchemaRegistryServiceImpl.java:229) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) ~[?:1.8.0_212]
   	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) ~[?:1.8.0_212]
   	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) ~[?:1.8.0_212]
   	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) ~[?:1.8.0_212]
   	at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.lambda$null$5(BookkeeperSchemaStorage.java:188) ~[org.apache.pulsar-pulsar-broker-2.4.1.jar:2.4.1]
   	at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:822) [?:1.8.0_212]
   	at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:797) [?:1.8.0_212]
   	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443) [?:1.8.0_212]
   	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_212]
   	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_212]
   	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_212]
   	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [?:1.8.0_212]
   ```
   
   
   

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


With regards,
Apache Git Services