You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are experiencing incompatible schemas being registered under the same schema id quite frequently
What did you expect to happen?
incompatible schemas should have different ids or fail to register if for the same subject (not the case, these are different subjects)
What else do we need to know?
Version of karapace: 3.10.4
We are experiencing quite frequent issues of corrupted schemas in our deployments that we haven't been able to pinpoint yet to a root cause. The issue is that at some point a non compatible schema gets assigned an already present schema id, thus breaking the deserialization of the already existent records using that schema. For instance we have a record schema with id 11 and then after a few months a message with schema string gets inserted as schema 11, making the messages with the previous schema unrecoverable unless doing some manual intervention.
Today I tried to dig deeper in the issue and try to recover the schemas by deleting the subject that corrupted the schema.
So I accessed the topic _schemas, listing all the schemas with schema id 11 (that is the one that got corrupted), names and values are redacted:
And indeed if I try to obtain the subject that I deleted I get an error:
❯ curl 'http://karapace-url/subjects/corrupt-subject/versions/1'
{"error_code":40401,"message":"Subject 'corrupt-subject' not found."}
I am not sure if we are doing some forbidden workflow, any help how to remove the corrupt schema (I know that all the entries for corrupt-subject won't be deserializable anymore) would be appreciated and also how we can debug the creation of corrupt entries, that are happening very frequently in our setup.
Thanks!
The text was updated successfully, but these errors were encountered:
What happened?
We are experiencing incompatible schemas being registered under the same schema id quite frequently
What did you expect to happen?
incompatible schemas should have different ids or fail to register if for the same subject (not the case, these are different subjects)
What else do we need to know?
Version of karapace:
3.10.4
We are experiencing quite frequent issues of corrupted schemas in our deployments that we haven't been able to pinpoint yet to a root cause. The issue is that at some point a non compatible schema gets assigned an already present schema id, thus breaking the deserialization of the already existent records using that schema. For instance we have a record schema with id 11 and then after a few months a message with schema
string
gets inserted as schema 11, making the messages with the previous schema unrecoverable unless doing some manual intervention.Today I tried to dig deeper in the issue and try to recover the schemas by deleting the subject that corrupted the schema.
So I accessed the topic
_schemas
, listing all the schemas with schema id11
(that is the one that got corrupted), names and values are redacted:Then we deleted the corrupt entry with:
And we got another entry in the
_schemas
topic, I presume to mark the subject as deleted:So we checked the versions for schema 11 using the API and all looks good:
But when I try to retrieve schema 11 I get the corrupt entry again:
And indeed if I try to obtain the subject that I deleted I get an error:
I am not sure if we are doing some forbidden workflow, any help how to remove the corrupt schema (I know that all the entries for
corrupt-subject
won't be deserializable anymore) would be appreciated and also how we can debug the creation of corrupt entries, that are happening very frequently in our setup.Thanks!
The text was updated successfully, but these errors were encountered: