Refactor AvroSchemaResolver: WriterSchemas enum + WriterSchemaKey#37051
Merged
martykulma merged 1 commit intoJun 16, 2026
Merged
Conversation
3731e93 to
c00677a
Compare
patrickwwbutler
approved these changes
Jun 16, 2026
patrickwwbutler
left a comment
Contributor
There was a problem hiding this comment.
LGTM with an opinion comment on the class name of WriterSchemas!
| /// without a registry to fetch from). Each variant owns its cache type by | ||
| /// construction, so the resolver cannot mis-route a key to the wrong | ||
| /// cache. | ||
| pub enum WriterSchemas { |
Contributor
There was a problem hiding this comment.
Just at first glance the name WriterSchemas feels a bit ambiguous to me, because it kind of implies that the schemas themselves literally exist in this object (which I guess they kind of do when there's a cache?), when it seems like it's more generally a way to get the schemas?
7e761ea to
002e27d
Compare
002e27d to
16c7ea6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generalize the handling of writer schemas and their keys.
When MZ reads a message from Kafka, it will parse the wire format header to determine what schema the message was written with. It may have been the reader schema, but it may be a different schema (the writer schema) that MZ will need to dynamically look up.