CCDAK practice question 1 of 25
In Avro, removing or adding a field that has a default is a __ schema evolution
Full set: 150 questionsIn Avro, a schema evolution is considered full or fully compatible if it is both backward and forward compatible.
1. Adding a field with a default value: This is both backward and forward compatible. A new consumer can read old data by using the default value for the missing field. An old consumer can read new data by simply ignoring the newly added field.
2. Removing a field that has a default value: This is also both backward and forward compatible. A new consumer can read old data by ignoring the field that has been removed. An old consumer can read new data by using its defined default value for the now-missing field. Since both operations are compatible in both directions, they are classified as a full schema evolution.
B. backward: This is incomplete. While the change is backward compatible, it is also forward compatible, making "full" the more accurate and comprehensive answer.
C. breaking: This is incorrect. The use of default values ensures that both old and new schemas can process the data without errors, preventing a breaking change.
D. forward: This is incomplete. While the change is forward compatible, it is also backward compatible. "Full" is the correct term for compatibility in both directions.
1. Confluent Documentation: Schema Evolution and Compatibility for Schema Registry on Confluent Cloud. Under the section "Compatibility types", the table for FULL compatibility explicitly lists "Add optional fields" and "Delete optional fields" as valid changes. An optional field in this context is one with a default value.
Reference: Confluent Documentation > Schema Registry > Concepts > Schema Evolution and Compatibility > Compatibility types.
2. Apache Avro™ 1.11.3 Specification: Schema Resolution. The rules for resolving schemas between a reader and a writer confirm this behavior.
For adding a field with a default: "If the reader's schema has a field that is not present in the writer's schema, the reader should use the default value for that field." (Ensures backward compatibility).
For removing a field: "If the writer's schema has a field that is not present in the reader's schema, the reader should ignore the field." (Ensures forward compatibility for the add, and backward for the remove).
Keep practicing
Take the free CCDAK practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CCDAK practice questions
- Question 2A topic has three replicas and you set min.insync.replicas to 2. If two out of three repl…
- Question 3To get acknowledgement of writes to only the leader partition, we need to use the config.…
- Question 4A customer has many consumer applications that process messages from a Kafka topic. Each …
- Question 5What information isn't stored inside of Zookeeper? (select two)
- Question 6If you enable an SSL endpoint in Kafka, what feature of Kafka will be lost?
- Question 7The exactly once guarantee in the Kafka Streams is for which flow of data?
