pravega / schema-registry

Pravega Schema Registry repository
Apache License 2.0
15 stars 23 forks source link

Error 504 in case of adding custom schema with no name/type #227

Open shshashwat opened 3 years ago

shshashwat commented 3 years ago

Problem description While trying to add a custom schema or json for a given stream, if the name/type which is an optional field not provided the server sends an error 504 after 1 minute which is defalut timeout set by the loadbalancer. This happens as internally this is a required field and in case of protobuf and avro the same value gets populated by reading the schema provided with addSchema request but the same implementation for JSON and Custom is not there. And the code keeps on retying to addSchema as the exception thrown is retriable causing an endless retries till the 504 error is thrown.

Problem location Add Schema API

Suggestions for an improvement Add implementation for JSON and Custom schema types as well so that if the required but optional field is not sent with the request, it should be able to parse and use the same way it's doing for Avro and Protobuf types.