Skip to content

Conversation

@erikrozendaal
Copy link
Member

This allows the user of Sequent to take a snapshot of the aggregate and store it.

You can take the snapshot from the passed in aggregate but must store the snapshot in the same transaction, otherwise non-committed events might be part of the snapshot.

Another option is to reload the aggregate for snapshotting using a separate transaction (for example, using a background job).

This allows the user of Sequent to take a snapshot of the aggregate
and store it.

You can take the snapshot from the passed in aggregate but must store
the snapshot in the same transaction, otherwise non-committed events
might be part of the snapshot.

Another option is to reload the aggregate for snapshotting using a
separate transaction (for example, using a background job).
In case snapshots are created concurrently (due to notifications when
loading an aggregate) the last one created should overwrite any older
versions.

This may also help when a snapshot is corrupted and a newer snapshot
is created, although in this case it is better to delete the corrupted
snapshot first.
@erikrozendaal erikrozendaal force-pushed the notify-when-loading-aggregates-that-need-a-new-snapshot branch from d14120c to 112b7ca Compare December 11, 2025 08:28
@erikrozendaal erikrozendaal changed the base branch from master to use-class-variables-for-projector-configuration December 11, 2025 10:28
Base automatically changed from use-class-variables-for-projector-configuration to master December 12, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants