Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulsar schema doesn't do compatibility check for primitive types #4831

Closed
sijie opened this issue Jul 27, 2019 · 6 comments · Fixed by #5051
Closed

Pulsar schema doesn't do compatibility check for primitive types #4831

sijie opened this issue Jul 27, 2019 · 6 comments · Fixed by #5051
Labels
type/bug The PR fixed a bug or issue reported a bug
Milestone

Comments

@sijie
Copy link
Member

sijie commented Jul 27, 2019

Describe the bug

Currently Pulsar schema doesn't do compatibility check for primitive types. That says if a consumer connect to a topic with a different schema type. It still can connect and receive messages. Exception is only thrown when retrieving the values from the received messages.

To Reproduce
Steps to reproduce the behavior:

  1. Send messages with Schema.STRING
  2. Consume messages with Schema.INT32

Expected behavior

The consumer should be rejected when subscribing.

@sijie sijie added type/bug The PR fixed a bug or issue reported a bug component/schemaregistry labels Jul 27, 2019
@sijie sijie added this to the 2.4.1 milestone Jul 27, 2019
@codelipenghui
Copy link
Contributor

@congbobo184 please take a look this issue.

@jiazhai
Copy link
Member

jiazhai commented Aug 20, 2019

@sijie @congbobo184 I am trying to do 2.4.1 release. How about move this into 2.5.0?

@sijie sijie modified the milestones: 2.4.1, 2.5.0 Aug 20, 2019
@sijie
Copy link
Member Author

sijie commented Aug 20, 2019

moved to 2.5.0

@congbobo184
Copy link
Contributor

how we check compatibility for INT8 and INT16? we allow they decode the message for themself or allow INT16 read INT8? any suggestion can give to me ?

@sijie
Copy link
Member Author

sijie commented Aug 21, 2019

@congbobo184 to keep simple, we only check compatibilities when using same schema type. different schema types are always incompatible.

@congbobo184
Copy link
Contributor

@congbobo184 to keep simple, we only check compatibilities when using same schema type. different schema types are always incompatible.
ok, i will do with what you mean :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants