-
Notifications
You must be signed in to change notification settings - Fork 592
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
CORE-5083 schema_registry: last subject deletes schema #20847
CORE-5083 schema_registry: last subject deletes schema #20847
Conversation
4711b4c
to
d6e8d42
Compare
Force-push: code review feedback |
d6e8d42
to
367a36e
Compare
Force-push: address more code review suggestions |
Add support to `store::subject_versions_has_any_of` for including deleted subject versions.
367a36e
to
cd515cc
Compare
Force-push: fix linting error |
When the last subject version corresponding to a schema is deleted, Schema Registry should also remove the schema. On the topic, the schema is already considered deleted when the last subject version is deleted, and compaction takes care of removing it. However, without this change, compaction needs to happen and then a node restart needs to happen before the schema is removed from memory. This is not ideal for use cases where schemas are frequently created and deleted (eg. Serverless), so instead we can remove the schema from memory when its last subject version is deleted.
cd515cc
to
d85de7b
Compare
Force-push: fix potential use after move |
/backport v24.1.x |
/backport v23.3.x |
skipped ducktape retry in https://buildkite.com/redpanda/redpanda/builds/51160#019083d8-685b-4487-a46e-5170a19af9cb: skipped ducktape retry in https://buildkite.com/redpanda/redpanda/builds/51160#019083d8-685f-498f-b62b-4823f28f8439: |
When the last subject version corresponding to a schema is deleted, schema registry should also remove the schema.
On the topic, the schema is already considered deleted when the last subject version is deleted, and compaction takes care of removing it. However, without this change, compaction needs to happen and then a node restart needs to happen before the schema is removed from memory. This is not ideal for use cases where schemas are frequently created and deleted (eg. Serverless), so instead we can remove the schema from memory when its last subject version is deleted.
Fixes https://redpandadata.atlassian.net/browse/CORE-5083
Backports Required
Release Notes
Improvements