How does Axon deal with changes on aggregates when you are having AggregateSnapshot’s?
AggregateSnapshot is storing the entire aggregate so I can imagine unserialize the aggregate when fields is removed or modified.
I have tested upcasters but they doesn’t get called with my AggregateSnapshots.
The ideal solution would probably be for me that we run rebuild the snapshots again from the events.
I couldn’t find anything about this in the official documentation?
I hope anybody can help answering this.
Right now, the best option you have is to configure a snapshotFilter on the AxonServerEventStore on your own.
Snapshots for older aggregate types could be ignored this way, instead of attempting to initialize an aggregate based on them.
I do not have some examples for you at the moment.
Thanks for your reply on this. Sad it isn’t something you support. There must be many with this issue. But your suggestion is better than nothing.
We still have an Axon 2 version of our application that we are forced to maintain (we are working on upgrading). Here does this not seem to be an option.
Do you have any advises against deleting the snapshots? I mean, they ain’t our single-source-of-truth (events is).
I would think that we then automatically re-creates updated snapshots when aggregates its touched next time. Performance can of course then be expected
Do you have any advises against deleting the snapshots?
To be honest, I think it’s perfectly fine to drop your snapshots.
However when using Axon Server, the snapshots file does not give you an easy handle to “just remove this type of aggregate snapshots”.
Hence why Ivan is giving the suggestion he just gave; and the issue to simplify filtering of course.