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

(fix) Fix client.register cache lookup #62

Merged

Conversation

Naillik1
Copy link
Contributor

The SchemaRegistryClient.subject_to _schema_ids is treated as a Mapping[subject, Mapping[schema, schema_id]], but the lookup in SchemaRegistryClient.register is treated as a Mapping[subject, Mapping[subject, schema_id]] and so always misses. This results in a cached schema being registered multiple times.

Naillik1 and others added 3 commits July 31, 2020 11:14
subject_to _schema_ids maps subject -> schema -> schema_id, but this lookup is treated as a map subject -> subject -> schema_id, and so always misses, resulting in the registering of a new schema.
@marcosschroh
Copy link
Owner

marcosschroh commented Aug 4, 2020

Hi @Naillik1

Thanks. Could you maybe rebase so the checks can run again? I fixed an issue with fastavro so the build was broken

@marcosschroh marcosschroh merged commit 1ce19fd into marcosschroh:master Aug 10, 2020
com4 pushed a commit to com4/python-schema-registry-client that referenced this pull request Aug 13, 2020
subject_to _schema_ids maps subject -> schema -> schema_id, but this lookup is treated as a map subject -> subject -> schema_id, and so always misses, resulting in the registering of a new schema.

Co-authored-by: Marcos Schroh <schrohm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants