Skip to content

Handle out of order events at the Merchant Balance Projection #351

@StuartFerguson

Description

@StuartFerguson

If an event comes into the projection out of order then we need to ensure that balance values (and running totals) are updated correctly, I think this is currently ok.

Where a real issue has been observed is the balance value that is written to the history table as this uses the balance value from the state which is not what the balance was at the time of the event happening.

Suggest creating a test for this where the events are processed in the wrong order and then checking this history table.

Once this is in and failing can look at options to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBugs and error-prone code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions