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

Schema registry is called even when local cache exists. #3956

Closed
ivanpedersen opened this issue Nov 8, 2023 · 0 comments · Fixed by #3957
Closed

Schema registry is called even when local cache exists. #3956

ivanpedersen opened this issue Nov 8, 2023 · 0 comments · Fixed by #3957
Labels
area/storage type/bug Something isn't working
Milestone

Comments

@ivanpedersen
Copy link
Contributor

Description

Registry Version: latest
Persistence type: all

Environment

When using DefaultSchemaResolver it doesn't matter if a schema is found in the local ERCache,
incorrect usage of .orElse() results in that the schema registry (getSchemaFromRegistry(parsedSchema, data, artifactReference)) is called anyway.

See: https://www.baeldung.com/java-optional-or-else-vs-or-else-get

Steps to Reproduce

Serialize 2 messages of the same type, the second message should not cause any calls to the schema registry if processed before the cache has expired.

Expected vs Actual Behaviour

When a schema is found in the local cache and it's not yet expired, the schema registry should not be called.

@ivanpedersen ivanpedersen added the type/bug Something isn't working label Nov 8, 2023
@carlesarnal carlesarnal modified the milestones: 2.6., 2.6.x Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants