mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-29 20:57:00 +00:00
When learning a schema that has a linked cdc schema, we need to learn also the cdc schema, and at the end the schema should point to the learned cdc schema. This is needed because the linked cdc schema is used for generating cdc mutations, and when we process the mutations later it is assumed in some places that the mutation's schema has a schema registry entry. We fix a scenario where we could end up with a schema that points to a cdc schema that doesn't have a schema registry entry. This could happen for example if the schema is loaded before it is learned, so when we learn it we see that it already has an entry. In that case, we need to set the cdc schema to the learned cdc schema as well, because it could have been loaded previously with a cdc schema that was not learned. Fixes scylladb/scylladb#27610 Closes scylladb/scylladb#27704