Skip to content

append_events procedure is missing a transaction #429

@nmummau

Description

@nmummau

I noticed that SQL Server's append_events procedure is missing a transaction.

SqlServer.Rules : Wrap multiple action statements within a transaction. (https://github.com/ErikEJ/SqlServer.Rules/blob/master/docs/Design/SRD0009.md)

The problem this causes:
If the INSERT into the [Messages] table succeeds, it's possible that the UPDATE to the [Streams] table might fails. Without a transaction, the INSERT will not be rolled back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions