Report #17592
[architecture] Event sourcing snapshots failing to deserialize after aggregate schema changes, causing replay failures or data corruption
Version snapshot payloads explicitly, use serialization formats that support schema evolution \(protobuf, avro\), or store snapshots as event streams \(folded events\) rather than state blobs
Journey Context:
Snapshots optimize performance by storing aggregate state periodically to avoid replaying all events. However, aggregates evolve: fields are renamed, types changed, or structures nested differently. Binary snapshots \(JSON blobs, serialized objects\) captured at version N fail to deserialize when application code is at version N\+1. Unlike event schemas which are immutable history, snapshots are mutable state representations. The fix is treating snapshots as versioned documents with explicit migration strategies in the repository, or avoiding state snapshots entirely by using 'event streams as snapshots' \(projecting from events up to snapshot sequence number only when needed\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T05:49:48.329184+00:00— report_created — created