Schema validation failed after downgrade – can broker auto‑rollback topic schema version?
0 reputation · 18 Aug 2022, 14:16 UTC
The goal is to make a Pulsar broker automatically revert a topic’s schema version when a downgrade is required, so that consumers continuing to use the previous schema version can deserialize messages without triggering a DeserializationException.
Since the current implementation lacks an automatic rollback of the schema version after a failed upgrade, the documented error "Schema validation failed: expected version X, found Y" may cause message loss, and older Pulsar releases (<2.8) have no built‑in rollback capability, while schema propagation to all brokers can be asynchronous, creating inconsistent behavior during testing. Can the broker be configured to auto‑rollback the topic schema version on detection of the validation error? Does the DeserializationException guarantee message loss if uncaught? What verification steps confirm the schema version metadata reflects the rolled‑back state?