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

[CORE-3008] schema_registry: Improve handling of deleted schema #19944

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

BenPope
Copy link
Member

@BenPope BenPope commented Jun 21, 2024

store::get_versions was ignoring include_deleted, which meant that
the new schema was detected as existing, but not a candidate for
being added as a new version.

A test was fixed up, as schema id 1 is not compatible with id v2,
compatibility must be set to NONE before adding back id 1, as it
will become version 3.

When the last version is soft-deleted, the config should be cleared.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v24.1.x
  • v23.3.x
  • v23.2.x

Release Notes

Bug Fixes

  • Schema Registry: Improve handling of deleted schema

store::get_versions was ignoring include_deleted, which meant that
the new schema was detected as existing, but not a candidate for
being added as a new version.

A test was fixed up, as schema id 1 is not compatible with id v2,
compatibility must be set to NONE before adding back id 1, as it
will become version 3.

Signed-off-by: Ben Pope <ben@redpanda.com>
@BenPope BenPope requested a review from a team June 21, 2024 12:52
@BenPope BenPope self-assigned this Jun 21, 2024
@BenPope BenPope requested review from andijcr and removed request for a team June 21, 2024 12:52
@BenPope BenPope added the area/schema-registry Schema Registry service within Redpanda label Jun 21, 2024
@BenPope BenPope requested a review from pgellert June 21, 2024 12:52
pgellert
pgellert previously approved these changes Jun 21, 2024
Copy link
Contributor

@pgellert pgellert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

src/v/pandaproxy/schema_registry/store.h Show resolved Hide resolved
tests/rptest/tests/schema_registry_test.py Show resolved Hide resolved
@vbotbuildovich
Copy link
Collaborator

new failures in https://buildkite.com/redpanda/redpanda/builds/50515#01903b21-9061-476d-b31d-cf831d8141b2:

"rptest.tests.crl_test.CertificateRevocationTest.test_pp_api"

andijcr
andijcr previously approved these changes Jun 24, 2024
BenPope added 2 commits June 24, 2024 15:10
When the last version is soft-deleted, the config should be cleared.

Signed-off-by: Ben Pope <ben@redpanda.com>
Signed-off-by: Ben Pope <ben@redpanda.com>
@BenPope BenPope dismissed stale reviews from andijcr, pgellert, and michael-redpanda via 4261670 June 24, 2024 14:36
@BenPope BenPope force-pushed the schema_registry/delete_version branch from 7ed6b9a to 4261670 Compare June 24, 2024 14:36
@BenPope
Copy link
Member Author

BenPope commented Jun 24, 2024

Changes in [force-push]

  • Address review comments

@BenPope BenPope merged commit 92a4a69 into redpanda-data:dev Jun 24, 2024
19 checks passed
@vbotbuildovich
Copy link
Collaborator

/backport v24.1.x

@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda area/schema-registry Schema Registry service within Redpanda
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants