-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[schema] Introduce schema data validator #4360
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, just left a comment.
validateSchemaData(kvSchema.getValue()); | ||
break; | ||
default: | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it better to throw a InvalidSchemaDataException? because use a unknown schema type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. will change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@codelipenghui I have addressed your comment. PTAL. |
run integration tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
run java8 tests |
please don't retest this pull request. The cpp/python tests require some changes. |
@jiazhai @codelipenghui @congbobo184 I pushed a fix (dfca5ae) to address python client issue apache/pulsar-client-python#30 . Please take a look. |
run java8 tests |
lgtm + 1 |
lgtm + 1 |
Motivation
Currently the schema data is only validated in compatibility checker. If the schema data is uploaded from admin api, there is no validation if the schema is the first version.
Changes
Add schema data validator to validate the schema data before storing it in schema storage.