-
Notifications
You must be signed in to change notification settings - Fork 89
Schema registry changes #3550
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
base: main
Are you sure you want to change the base?
Schema registry changes #3550
Conversation
Tested locally bumping the version of Restate here to |
1a40491
to
644c9f7
Compare
644c9f7
to
23415a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the majority of the changes are mechanical. Just left a couple of nits but overall direction is reasonable.
use crate::{Version, Versioned, identifiers}; | ||
use arc_swap::ArcSwapOption; | ||
use restate_serde_util::MapAsVecItem; | ||
use serde_json::Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I'd appreciate if imports are organized according to our convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said in other PRs, I'll be happy to do that with a tool that automates it.
1d32638
to
b0ec13f
Compare
This commit contains the changes described in restatedev#3303 * metadata contains the "implementation" of the schema registry, and the serializable data structure `Schema`. * `metadata/mod.rs` contains the definition of `Schema` and the implementation of the various schema registry APIs. All the fields are private, and access should be available only through schema registry APIs or `SchemaUpdater`. * `Schema` now uses the new data types from the old `v2.rs` file. On deserialization, we infer the "active service revisions" index (the logic for that is within `serde_hacks`). * `v2.rs` conversions was moved to `metadata/serde_hacks.rs`, the new data model is directly in `metadata/mod.rs`. Inside it, I moved the old data types *Schemas, which should not be used anymore. * `SchemaUpdater` was moved inside `metadata`, and deals with the new `Schema` data structure. The behavior remains untouched. Everything else is more or less copying stuff around and renaming.
We should merge this for Restate 1.5
b0ec13f
to
c36a867
Compare
Fix #3303