Engineering, production, governance, cost, communication · insight-0261
Enforce backward-compatible schema changes and upgrade consumers first
- Evidence type
- documented fact
- Difficulty
- medium
- Roles
- ML engineer
- Industries
- cross-industry
Summary: situation, action, reason, boundary
Situation
An event producer wants to add a field and drop an old one in the stream your features read from.
Action
Register schemas with a compatibility rule (backward by default), make new fields optional with defaults, remove only optional or defaulted fields, and roll out consumer changes before producers write the new schema.
Reason
Under backward compatibility, consumers using the new schema can read data written with older ones, which requires consumers to upgrade first.
Boundary
Event streams, Avro or Protobuf contracts, feature tables shared across teams.
Symptom or risk
Incompatible changes break deserialisation or silently fill fields with nulls in feature pipelines.
Exceptions
Full or transitive compatibility is safer when consumers replay old history.
Trade-offs
Strict rules slow schema clean-up; old fields linger.
Pitfalls
A field that keeps its name and type but changes meaning passes every compatibility check.
Lessons and concepts
Claims and their sources
Confluent Schema Registry's default compatibility is BACKWARD, which allows deleting fields and adding optional fields and requires upgrading consumers before producers.