I have an enum in an AVRO schema like this :
{
"type": "record",
"name": "MySchema",
"namespace": "com.company",
"fields": [
{
"name": "color",
"type": {
"type": "enum",
"name": "Color",
"symbols": [
"UNKNOWN",
"GREEN",
"RED"
]
},
"default": "UNKNOWN"
}
]
}
When using FULL (which means BACKWARD and FORWARD) compatibility mode, how am I supposed to add a new symbol to the enum ? Is this impossible ?
I read Avro schema : is adding an enum value to existing schema backward compatible? but it doesn't help.
Whenever I try to add a new value to the symbols it fails the compatibility check in the schema registry even though I have a default value on the enum. After testing a bit it seems that adding a new value is BACKWARD compatible but not FORWARD compatible. However, due to the default value I set I expected it to be also FORWARD compatible. Indeed the old reader schema should be able to read a value written by the new schema and default to the "UNKNOWN" enum value when it doesn't know the new symbol.