Skip to content

Fix/issue 429 transaction - #1

Merged
nmummau merged 19 commits into
devfrom
fix/issue-429-transaction
Oct 8, 2025
Merged

Fix/issue 429 transaction#1
nmummau merged 19 commits into
devfrom
fix/issue-429-transaction

Conversation

@nmummau

@nmummau nmummau commented Oct 8, 2025

Copy link
Copy Markdown
Owner

No description provided.

alexeyzimarev and others added 19 commits October 7, 2025 14:28
# Conflicts:
#	.github/workflows/preview.yml
#	.github/workflows/publish.yml
#	.github/workflows/pull-request.yml
- SET NOCOUNT ON
- Wrap keywords in brackets ([Version], [Messages])
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (INT, AND)
- use alias to DELETE statement
- semicolons
- SET NOCOUNT ON
- Wrap keywords in brackets ([Messages])
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (INT, BIGINT)
- remove 'Messages.' from query since it was redundant
- semicolons
- SET NOCOUNT ON
- Wrap keywords in brackets ([Version], [Messages])
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (INT)
- remove 'Messages.' from query since it was redundant
- semicolons
- SET NOCOUNT ON
- Wrap keywords in brackets ([Version], [Messages])
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (INT)
- remove 'Messages.' from query since it was redundant
- semicolons
- SET NOCOUNT ON
- formatting: each column on it's own line. Best practice for maintainability of procedures
- use aliases
- semicolons
- SET NOCOUNT ON
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (AND)
- semicolons
- SET NOCOUNT ON
- remove unused declared variables
- specify all parameters when calling [check_stream] procedure
- formatting: each column on it's own line. Best practice for maintainability of procedures
- proper casing of keywords (IF, ISNULL, NVARCHAR)
- use alias to UPDATE statement
- remove 'AS' keyword
- semicolons
- consistent casing of [Version] column
- explicitly specify NULLable columns
SQL Server schema change so that Messages.Created is NOT NULL. This is safe and accurate to do since append_events will always set this value if a NULL is provided to the procedure.
- Messages TABLE
    - JsonMetaData is NOT NULL
    - json columns are checked to ensure they contain json data
- StreamMessage TYPE
    - json_metadata is NOT NULL
…e naming' warning that bito-code-review flagged
- Wrapped append_events logic in a single transaction with SET XACT_ABORT ON
- Changed @stream_name parameter to NVARCHAR(850) for consistency
- Added guard clause for empty @messages
- Introduced @Inserted table to capture inserted GlobalPosition values atomically
- Updated Streams.[Version] within the same transaction
- Normalized optimistic concurrency errors (2627, 2601) to client-detectable messages
- Thrown error messages still StartsWith 'WrongExpectedVersion' but now also includes the full SQL error text for client tracing
- Removed redundant post-commit queries and error-parsing logic

Fixes issue Eventuous#429
@nmummau
nmummau merged commit f53dc63 into dev Oct 8, 2025
1 of 3 checks passed
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.

3 participants