Skip to content

Make MsSqlDialect compatible with AzureSql and READ COMMITTED SNAPSHOT #31

Open
@fschmied

Description

@fschmied

NEventStore's SqlPersistenceEngine relies on database-level locks when reading commits. When one enables SQL Server's READ COMMITTED SNAPSHOT option at the DB level, this stops working and there's a high possibility of skipping commits. On Azure SQL this option is always on, so one will easily experience lost commits on Azure SQL. This was reported previously, e.g., in #14 or #21 (comment).

To cope with that, the MsSqlDialect should use READCOMMITTEDLOCK table hints when reading commits to enforce locking.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions