-
Notifications
You must be signed in to change notification settings - Fork 80
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
AvroTurf::SchemaStore do not follow Avro specification when loading nested schemas #186
Labels
Comments
I guess there’s nothing to do then? |
There is. I just opened https://issues.apache.org/jira/browse/AVRO-3790 |
PR opened in the Avro repo: apache/avro#2409 |
Stale issue message |
Avro 1.11.3 has been released, I can now create a PR to fix this issue! |
piotaixr
added a commit
to piotaixr/avro_turf
that referenced
this issue
Oct 3, 2023
piotaixr
added a commit
to piotaixr/avro_turf
that referenced
this issue
Oct 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The avro specification states in https://avro.apache.org/docs/1.10.2/spec.html#names:
This means that, if we have the following schema file:
foo/bar.avsc
... then, the
another_schema
schema MUST be in thefoo
namespace asA name only is specified, i.e., a name that contains no dots. In this case the namespace is taken from the most tightly enclosing schema or protocol
Currently, the
AvroTurf::SchemaStore
will try to loadanother_schema.avsc
in the null namespace (at the root of the provided path) instead of in thefoo
folder.I did not find a workaround for this as:
another_schema.avsc
file is at the root, Avro do not find the schema in the provided cache, which causes a double load, and Avro raises a "already in use" erroranother_schema.avsc
file is in thefoo
folder like it should be according to spec, then theSchemaStore
do not find it as the file name to load is extracted from the exception message, and this message do not contains the fullname, but only the name of the schema that is attempted to be loaded.The only solution is to explicitely provide the namespace for every nested schema reference that we expect the schema store to load, even if the specification allows us not to.
The text was updated successfully, but these errors were encountered: