Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/31 readcommitedlock #39

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

AGiorgetti
Copy link
Member

@AGiorgetti AGiorgetti commented Jul 31, 2023

MsSql: add support for READCOMMITTEDLOCK

still need to improve tests cause some of them involving multiple transaction will succeed and unsupported scenarios might become supported when using READCOMMITTEDLOCK.

but we need to refactor again tests initialization heavily.

we also need to cherry-pick commits becase this branch started from a release.

- Fix: NEventStore constraint failed with MySql 8.x (works with 5.7) [#487](https://github.com/NEventStore/NEventStore/issues/487)

### Breaking Change

- The fix for [#487](https://github.com/NEventStore/NEventStore/issues/487) changed how the `Commits` table is created for MySql 8.x:
to update an existing database in order to run on 8.x you need to manually update the `Commits` table schema and change the constraint of the `CommitId` column
from: `CommitId binary(16) NOT NULL CHECK (CommitId != 0)` to: `CommitId binary(16) NOT NULL CHECK (CommitId <> 0x00)`.
- MsSqlDialects now have an `useAzureSql` parameter, if set to `true` the statement `WITH (READCOMMITTEDLOCK)` will be added to any `FROM Commits` query.
Copy link

@fschmied fschmied Jul 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could even be made a default. It does no harm outside of Azure SQL. In fact, it will also make NEventStore more robust with local SQL Server, too, when someone enabled the READ COMMITTED SNAPSHOT option on the database.

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.

2 participants