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

Schema registry does not create versions correctly after deletion #18561

Open
nicolaferraro opened this issue May 17, 2024 · 0 comments
Open
Labels
kind/bug Something isn't working

Comments

@nicolaferraro
Copy link
Member

nicolaferraro commented May 17, 2024

Version & Environment

Redpanda version: (use rpk version): 24.1.2

What went wrong?

After deleting some subject versions and recreating them, the registry shows an inconsistent state.

What should have happened instead?

I'd expect a deleted schema that is later added not to be ignored.

How to reproduce the issue?

To replicate:

curl -H "Content-Type: application/json" -X POST -d '{"schema": "{\"type\": \"int\"}"}' -i http://localhost:8072/subjects/test/versions
curl -H "Content-Type: application/json" -X PUT -d '{"compatibility": "NONE"}' -i http://localhost:8072/config/test
curl -H "Content-Type: application/json" -X POST -d '{"schema": "{\"type\": \"string\"}"}' -i http://localhost:8072/subjects/test/versions
curl -H "Content-Type: application/json" -i http://localhost:8072/subjects/test/versions
# this ^ correctly returns [1,2]
curl -H "Content-Type: application/json" -X DELETE -i http://localhost:8072/subjects/test/versions/1
curl -H "Content-Type: application/json" -X DELETE -i http://localhost:8072/subjects/test/versions/2
curl -H "Content-Type: application/json" -X POST -d '{"schema": "{\"type\": \"int\"}"}' -i http://localhost:8072/subjects/test/versions
# this ^ is accepted with {"id": 1}, as before
curl -H "Content-Type: application/json" -i http://localhost:8072/subjects/test/versions
# this ^ returns [3]
curl -H "Content-Type: application/json" -X POST -d '{"schema": "{\"type\": \"string\"}"}' -i http://localhost:8072/subjects/test/versions
# this ^ is accepted with {"id": 2}, as before
curl -H "Content-Type: application/json" -i http://localhost:8072/subjects/test/versions
# this ^ still returns [3], I'd expect it to be [3,4] but the "string" version was ignored

JIRA Link: CORE-3008

@nicolaferraro nicolaferraro added the kind/bug Something isn't working label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant