Skip to content

Snapshot upgrader need metadata #919

Open

Description

@nlips

My SnapshotUpgrader need to retrieve data from the aggregate's events.
For this, it use the IEventStore instance.
But it should only take into account events whose sequence is less than or equal to that of the snapshot.
This information should be an argument of the UpgradeAsync method.
Moreover IEventStore should provide a method to get a range of events.

Activity

  1. nlips commented on Jan 18, 2022

    @nlips
    Author

    Actually I can't use IEventStore... I don't have the aggregate's id !

  2. added this to the milestone on Feb 10, 2022
  3. github-actions commented on Apr 8, 2023

    @github-actions

    Hello there!

    We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days.
    We consider this issue to be stale and will be closing it within the next seven days.

    If you still require assistance with this issue, please feel free to reopen it or create a new issue.

    Thank you for your understanding and cooperation.

    Best regards,
    EventFlow

  4. github-actions commented on Jul 8, 2023

    @github-actions

    Hello there!

    We hope you are doing well. We noticed that this issue has not seen any activity in the past 90 days.
    We consider this issue to be stale and will be closing it within the next seven days.

    If you still require assistance with this issue, please feel free to reopen it or create a new issue.

    Thank you for your understanding and cooperation.

    Best regards,
    EventFlow

  5. SeWaS commented on Oct 30, 2023

    @SeWaS
    Contributor

    Hello there 👋

    Long-time lurker here. Decided that it's time to contribute a bit to the repository.

    The underlying idea of enabling the event store to load domain events within a given sequence-number range makes sense to me. I would go ahead and prepare a PR if still relevant.

    Regarding your snapshot upgrading question, would it help if the specific snapshots in your application would carry their respective aggregate Id in the payload? That way you would have access to it when upgrading from one snapshot version to the other, no?
    In case you found a solution to the problem, I would be curious what it was :)

    Cheers

  6. added a commit that references this issue on Mar 12, 2024
  7. rasmus commented on Dec 24, 2024

    @rasmus
    Member

    While an old issue, having more metadata available in the snapshot upgraders makes a lot of sense. Since it involves breaking changes, its a good candidate for a v2.

  8. added and removed on Dec 24, 2024
  9. removed this from the milestone on Dec 25, 2024
  10. rasmus commented on Dec 31, 2024

    @rasmus
    Member

    @nlips while it doesn't save you from your current problem, you could add the information you need to the snapshot yourself, e.g. add a property that holds the aggregate ID or other meta data you might need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions