-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schema_registry: Refactor: Move references to schema
This should be a pure refactoring. The store has two mappings: 1) `schema_map`: Schema ID to Schema (sharded across cores) 2) `subject_map`: Subject-Versions to Schema ID Each of these mappings are then split across shards, coordinated by sharded_store. Prior to this change, references were attached to the Subject-Versions. This is an incorrect modelling; Schema should own the references to other schema. This commit does that refactoring by moving references from `typed_schema` to `typed_schema_definition`. There are a couple of things that are not straightforward: 1) `ValidSchema` (`protobuf_schema_definition`, `avro_schema_definition`) are the respective library instantiations of the representation, and are unable to reproduce their references to form a `canonical_schema_definition`, so references are stored inside the wrappers. 2) `referenced_by` and `is_reference` now require two phases to obtain the references, due to the sharded and diconnected nature of the two mappings (schema, and subject-versions). a) Obtain a list of schema ids that reference the subject-version b) Filter that list by subject-versions that are not soft-deleted Signed-off-by: Ben Pope <ben@redpanda.com>
- Loading branch information
Showing
19 changed files
with
219 additions
and
189 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.