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

Fix SNAPSHOT ISOLATION detection in SQL Server #7555

Merged
merged 1 commit into from
Apr 12, 2021

Conversation

findepi
Copy link
Member

@findepi findepi commented Apr 11, 2021

Previously we were checking the flag set with ALTER DATABASE ... SET READ_COMMITTED_SNAPSHOT ... instead of the one set with ALTER DATABASE ... SET ALLOW_SNAPSHOT_ISOLATION .... The two flags are related, but
not the same. More explanation at
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server#snapshot-isolation-level-extensions

This also simplifies the TestingSqlServer setup and improves coverage of snapshot isolation tests.

Fixes #7548

@cla-bot cla-bot bot added the cla-signed label Apr 11, 2021
@findepi findepi force-pushed the findepi/sql-snapshot-isolation branch from 29d8890 to 8fd687e Compare April 11, 2021 20:30
Previously we were checking the flag set with `ALTER DATABASE ... SET
READ_COMMITTED_SNAPSHOT ...` instead of the one set with `ALTER DATABASE
... SET ALLOW_SNAPSHOT_ISOLATION ...`. The two flags are related, but
not the same. More explanation at
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/snapshot-isolation-in-sql-server#snapshot-isolation-level-extensions

This also simplifies the `TestingSqlServer` setup and improves coverage of snapshot isolation tests.

- `TestingSqlServer` still enables snapshot isolation by default, to
  avoid regular tests being flaky on CI (as in
  trinodb#6389). The
  `READ_COMMITTED_SNAPSHOT` is enabled by default as well.
- dedicated tests exercise the three remaining states of the
  `ALLOW_SNAPSHOT_ISOLATION` and `READ_COMMITTED_SNAPSHOT` options.
  These tests do not leverage `BaseConnectorSmokeTest` as this could
  re-introduce flakiness on CI.
@findepi findepi force-pushed the findepi/sql-snapshot-isolation branch from 8fd687e to 9b33e49 Compare April 12, 2021 07:53
@findepi
Copy link
Member Author

findepi commented Apr 12, 2021

CI #7559 and some related.

pushed change

  • remove BaseSqlServerConnectorSmokeTest
  • rename test classes

@findepi findepi merged commit 4f8221e into trinodb:master Apr 12, 2021
@findepi findepi deleted the findepi/sql-snapshot-isolation branch April 12, 2021 09:31
@findepi findepi added this to the 356 milestone Apr 12, 2021
@findepi findepi mentioned this pull request Apr 12, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

sqlserver Read and writes are not working if RCSI ON and Snaphsot Isolation OFF
2 participants