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 2022/08/30 15:45:50 UTC

[GitHub] [pulsar] cbornet opened a new issue, #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

cbornet opened a new issue, #17354:
URL: https://github.com/apache/pulsar/issues/17354

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
   
   
   ### Version
   
   2.10.1, master
   
   ### Minimal reproduce step
   
   * create an auto-consumer : bin/pulsar-client consume topic-a -s sub0 -n 0 -t Shared -st auto_consume
   * create a consumer on same topic, same sub this time with a schema
   
   ```java
       @Test
       private void test() throws Exception {
           try (PulsarClient client = PulsarClient.builder()
               .serviceUrl("pulsar://localhost:6650")
               .build()) {
               try (Consumer<CustomObject> ignored = client.newConsumer(Schema.AVRO(CustomObject.class))
                   .topic("topic-a")
                   .subscriptionType(SubscriptionType.Shared)
                   .subscriptionName("sub0")
                   .subscribe()) {
               }
           }
       }
   ```
   
   * ==> failure with `IncompatibleSchemaException("Topic does not have schema to check")`
   * stop the first consumer and start the test again ==> success
   
   ### What did you expect to see?
   
   Not failing
   
   ### What did you see instead?
   
   Failing
   
   ### Anything else?
   
   This happens because in `PersistentTopic::addSchemaIfIdleOrCheckCompatible`, we call `checkSchemaCompatibleForConsumer` if there are active consumers but no topic schema.
   And `checkSchemaCompatibleForConsumer` fails if there's no schema.
   Also `addSchemaIfIdleOrCheckCompatible` will not try to add the new consumer schema.
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: commits-unsubscribe@pulsar.apache.org.apache.org

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


[GitHub] [pulsar] eolivelli commented on issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #17354:
URL: https://github.com/apache/pulsar/issues/17354#issuecomment-1232728041

   reopened


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Denovo1998 commented on issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by GitBox <gi...@apache.org>.
Denovo1998 commented on issue #17354:
URL: https://github.com/apache/pulsar/issues/17354#issuecomment-1236162615

   Fixed by #17449 


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] congbobo184 closed issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by "congbobo184 (via GitHub)" <gi...@apache.org>.
congbobo184 closed issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic
URL: https://github.com/apache/pulsar/issues/17354


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Technoboy- commented on issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #17354:
URL: https://github.com/apache/pulsar/issues/17354#issuecomment-1232689424

   Fixed by #17353 


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] Technoboy- closed issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by GitBox <gi...@apache.org>.
Technoboy- closed issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic
URL: https://github.com/apache/pulsar/issues/17354


-- 
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: commits-unsubscribe@pulsar.apache.org

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


[GitHub] [pulsar] cbornet commented on issue #17354: [Bug] Subscription with schema fails if there is an AUTO-CONSUME consumer attached to a topic

Posted by GitBox <gi...@apache.org>.
cbornet commented on issue #17354:
URL: https://github.com/apache/pulsar/issues/17354#issuecomment-1232725291

   No it's not fixed by https://github.com/apache/pulsar/pull/17353.
   Can we reopen ?


-- 
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: commits-unsubscribe@pulsar.apache.org

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