From 0f7018902051b3c9f0e240268622f1e2ef409376 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 16 May 2024 16:17:14 -0700 Subject: [PATCH 1/8] Make YesSqlOptions configurable from configuration provider Fix #16006 --- .github/workflows/mac_unit_test_ci.yml | 10 ++++++---- .github/workflows/main_ci.yml | 2 ++ .github/workflows/pr_ci.yml | 2 ++ .github/workflows/preview_ci.yml | 2 ++ .github/workflows/release_ci.yml | 2 ++ src/OrchardCore.Cms.Web/appsettings.json | 6 ++++++ .../OrchardCoreBuilderExtensions.cs | 6 +++++- src/docs/reference/core/Data/README.md | 14 ++++++++++++-- 8 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mac_unit_test_ci.yml b/.github/workflows/mac_unit_test_ci.yml index a915d0d2be5..1feef9d1464 100644 --- a/.github/workflows/mac_unit_test_ci.yml +++ b/.github/workflows/mac_unit_test_ci.yml @@ -11,7 +11,9 @@ jobs: name: Unit Tests steps: - uses: actions/checkout@v4 - - name: Build and test - run: | - dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true - dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + - name: Build + run: dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true + - name: Run Test + run: dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + env: + OrchardCore__OrchardCore_YesSql: true diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index bee2eb249f5..8dee93da203 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -36,6 +36,8 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + env: + OrchardCore__OrchardCore_YesSql: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 4e645136ff5..8738212757e 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -30,6 +30,8 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + env: + OrchardCore__OrchardCore_YesSql: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index cc7910525ef..0b38de9d7bf 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -40,6 +40,8 @@ jobs: if: steps.check-publish.outputs.should-publish == 'true' run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + env: + OrchardCore__OrchardCore_YesSql: true - name: Functional Tests if: steps.check-publish.outputs.should-publish == 'true' run: | diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 6b9b440c45f..5e31b4c5796 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -45,6 +45,8 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj + env: + OrchardCore__OrchardCore_YesSql: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/src/OrchardCore.Cms.Web/appsettings.json b/src/OrchardCore.Cms.Web/appsettings.json index 07383b1c9cd..8eab980d4b0 100644 --- a/src/OrchardCore.Cms.Web/appsettings.json +++ b/src/OrchardCore.Cms.Web/appsettings.json @@ -25,6 +25,12 @@ // "DefaultTableNameSeparator": "_", // Table name separator, one or multiple '_', "NULL" means no separator, defaults to '_'. // "DefaultIdentityColumnSize": "Int64" // Identity column size, 'Int32' or 'Int64', defaults to 'Int64'. //}, + // See https://docs.orchardcore.net/en/latest/reference/core/Data/#database-table to configure database table presets used before a given tenant is setup. + //"OrchardCore_YesSql": { + // "CommandsPageSize": 500, + // "QueryGatingEnabled": true, + // "EnableThreadSafetyChecks": false + //}, // See https://docs.orchardcore.net/en/latest/reference/modules/DataProtection.Azure/#configuration to configure data protection key storage in Azure Blob Storage. //"OrchardCore_DataProtection_Azure": { // "ConnectionString": "", // Set to your Azure Storage account connection string. diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs index 22b6668eb17..64ed6f979b8 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs @@ -10,6 +10,7 @@ using OrchardCore.Data.Migration; using OrchardCore.Data.YesSql; using OrchardCore.Environment.Shell; +using OrchardCore.Environment.Shell.Configuration; using OrchardCore.Environment.Shell.Removing; using OrchardCore.Environment.Shell.Scope; using OrchardCore.Json; @@ -37,8 +38,11 @@ public static OrchardCoreBuilder AddDataAccess(this OrchardCoreBuilder builder) { builder.ApplicationServices.AddSingleton(); - builder.ConfigureServices(services => + builder.ConfigureServices((services, serviceProvider) => { + var configuration = serviceProvider.GetService(); + + services.Configure(configuration.GetSection("OrchardCore_YesSql")); services.AddScoped(); services.AddScoped(); services.AddScoped(); diff --git a/src/docs/reference/core/Data/README.md b/src/docs/reference/core/Data/README.md index c57f6ab46df..b5ec5d868b8 100644 --- a/src/docs/reference/core/Data/README.md +++ b/src/docs/reference/core/Data/README.md @@ -36,6 +36,7 @@ OrchardCore uses the `YesSql` library to interact with the configured database p | `IdentifierAccessorFactory` | You can provide your own value accessor factory. | | `VersionAccessorFactory` | You can provide your own version accessor factory. | | `ContentSerializer` | You can provide your own content serializer. | +| `EnableThreadSafetyChecks` | Gets or sets the `EnableThreadSafetyChecks` option in YesSql, which aids in diagnosing concurrency or race condition issues. | For example, you can change the default command-page-size from `500` to `1000` by adding the following code to your startup code. @@ -46,6 +47,15 @@ services.Configure(options => }); ``` +You may configure `CommandsPageSize`, `QueryGatingEnabled`, and `EnableThreadSafetyChecks` options using a configuration provider like `appsettings.json` using the following + +```json +"OrchardCore_YesSql": { + "CommandsPageSize": 500, + "QueryGatingEnabled": true, + "EnableThreadSafetyChecks": false +}, + ## Database table The following database table settings, only used as presets before a given tenant is setup, can be provided from any configuration source. @@ -56,10 +66,10 @@ The following database table settings, only used as presets before a given tenan | `DefaultTableNameSeparator` | Table name separator, one or multiple '_', "NULL" means no separator, defaults to '_'. | | `DefaultIdentityColumnSize` | Identity column size, 'Int32' or 'Int64', defaults to 'Int64'. | -##### `appsettings.json` +#### Configuration Source (ex., `appsettings.json`) ```json - "OrchardCore_Data_TableOptions": { +"OrchardCore_Data_TableOptions": { "DefaultDocumentTable": "Document", "DefaultTableNameSeparator": "_", "DefaultIdentityColumnSize": "Int64" From 00ef54ad430a9da9a3c511b4162719bfe5e8f2b1 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 16 May 2024 16:33:50 -0700 Subject: [PATCH 2/8] Update the enviornment variable --- .github/workflows/mac_unit_test_ci.yml | 2 +- .github/workflows/main_ci.yml | 2 +- .github/workflows/pr_ci.yml | 2 +- .github/workflows/preview_ci.yml | 2 +- .github/workflows/release_ci.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mac_unit_test_ci.yml b/.github/workflows/mac_unit_test_ci.yml index 1feef9d1464..be6bafe981c 100644 --- a/.github/workflows/mac_unit_test_ci.yml +++ b/.github/workflows/mac_unit_test_ci.yml @@ -16,4 +16,4 @@ jobs: - name: Run Test run: dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj env: - OrchardCore__OrchardCore_YesSql: true + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 8dee93da203..910a59d11db 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -37,7 +37,7 @@ jobs: run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj env: - OrchardCore__OrchardCore_YesSql: true + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index 8738212757e..ecea44d3a68 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -31,7 +31,7 @@ jobs: run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj env: - OrchardCore__OrchardCore_YesSql: true + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index 0b38de9d7bf..283be317b9c 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -41,7 +41,7 @@ jobs: run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj env: - OrchardCore__OrchardCore_YesSql: true + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: steps.check-publish.outputs.should-publish == 'true' run: | diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 5e31b4c5796..0e91a374ceb 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -46,7 +46,7 @@ jobs: run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj env: - OrchardCore__OrchardCore_YesSql: true + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | From 1c391f4dd925f8c5f570e54685ec9f11d59a9e00 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 08:16:07 -0700 Subject: [PATCH 3/8] apply only to functional tests on all db --- .github/workflows/functional_all_db.yml | 5 ++++- .github/workflows/mac_unit_test_ci.yml | 10 ++++------ .github/workflows/main_ci.yml | 2 -- .github/workflows/pr_ci.yml | 2 -- .github/workflows/preview_ci.yml | 2 -- .github/workflows/release_ci.yml | 2 -- src/OrchardCore.Cms.Web/appsettings.json | 2 +- 7 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/functional_all_db.yml b/.github/workflows/functional_all_db.yml index 0e1af42ba36..c7f7f1a9a1d 100644 --- a/.github/workflows/functional_all_db.yml +++ b/.github/workflows/functional_all_db.yml @@ -69,7 +69,7 @@ jobs: test/OrchardCore.Tests.Functional/cms-tests/cypress/screenshots src/OrchardCore.Cms.Web/App_Data/logs retention-days: 3 - + test_functional_cms_postgresql: name: Functional Tests - CMS Postgres runs-on: ubuntu-latest @@ -91,6 +91,7 @@ jobs: env: OrchardCore__ConnectionString: "User ID=postgres;Password=admin;Host=postgres;Port=5432;Database=app;" OrchardCore__DatabaseProvider: "Postgres" + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true steps: - uses: actions/checkout@v4 # We need to install dotnet in the docker container. @@ -128,6 +129,7 @@ jobs: env: OrchardCore__ConnectionString: "server=mysql;uid=root;pwd=test123;database=test" OrchardCore__DatabaseProvider: "MySql" + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true steps: - uses: actions/checkout@v4 # We need to install dotnet in the docker container. @@ -164,6 +166,7 @@ jobs: env: OrchardCore__ConnectionString: "Server=mssql;Database=tempdb;User Id=sa;Password=Password12!;Encrypt=False" OrchardCore__DatabaseProvider: "SqlConnection" + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true steps: - uses: actions/checkout@v4 # We need to install dotnet in the docker container. diff --git a/.github/workflows/mac_unit_test_ci.yml b/.github/workflows/mac_unit_test_ci.yml index be6bafe981c..a915d0d2be5 100644 --- a/.github/workflows/mac_unit_test_ci.yml +++ b/.github/workflows/mac_unit_test_ci.yml @@ -11,9 +11,7 @@ jobs: name: Unit Tests steps: - uses: actions/checkout@v4 - - name: Build - run: dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true - - name: Run Test - run: dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj - env: - OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true + - name: Build and test + run: | + dotnet build -c Release -warnaserror /p:TreatWarningsAsErrors=true /p:RunAnalyzers=true + dotnet test -c Release --no-restore --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj diff --git a/.github/workflows/main_ci.yml b/.github/workflows/main_ci.yml index 910a59d11db..bee2eb249f5 100644 --- a/.github/workflows/main_ci.yml +++ b/.github/workflows/main_ci.yml @@ -36,8 +36,6 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj - env: - OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/pr_ci.yml b/.github/workflows/pr_ci.yml index ecea44d3a68..4e645136ff5 100644 --- a/.github/workflows/pr_ci.yml +++ b/.github/workflows/pr_ci.yml @@ -30,8 +30,6 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj - env: - OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/.github/workflows/preview_ci.yml b/.github/workflows/preview_ci.yml index 283be317b9c..cc7910525ef 100644 --- a/.github/workflows/preview_ci.yml +++ b/.github/workflows/preview_ci.yml @@ -40,8 +40,6 @@ jobs: if: steps.check-publish.outputs.should-publish == 'true' run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj - env: - OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: steps.check-publish.outputs.should-publish == 'true' run: | diff --git a/.github/workflows/release_ci.yml b/.github/workflows/release_ci.yml index 0e91a374ceb..6b9b440c45f 100644 --- a/.github/workflows/release_ci.yml +++ b/.github/workflows/release_ci.yml @@ -45,8 +45,6 @@ jobs: - name: Unit Tests run: | dotnet test -c Release --no-build ./test/OrchardCore.Tests/OrchardCore.Tests.csproj - env: - OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true - name: Functional Tests if: matrix.os == 'ubuntu-latest' run: | diff --git a/src/OrchardCore.Cms.Web/appsettings.json b/src/OrchardCore.Cms.Web/appsettings.json index 8eab980d4b0..841c0055de6 100644 --- a/src/OrchardCore.Cms.Web/appsettings.json +++ b/src/OrchardCore.Cms.Web/appsettings.json @@ -25,7 +25,7 @@ // "DefaultTableNameSeparator": "_", // Table name separator, one or multiple '_', "NULL" means no separator, defaults to '_'. // "DefaultIdentityColumnSize": "Int64" // Identity column size, 'Int32' or 'Int64', defaults to 'Int64'. //}, - // See https://docs.orchardcore.net/en/latest/reference/core/Data/#database-table to configure database table presets used before a given tenant is setup. + // See https://docs.orchardcore.net/en/latest/reference/core/Data/#configuring-yessql to configure YesSql. //"OrchardCore_YesSql": { // "CommandsPageSize": 500, // "QueryGatingEnabled": true, From 50b21bded744e36e3cdfcd2b83500eef98e8b535 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 08:37:12 -0700 Subject: [PATCH 4/8] Fail when EnableThreadSafetyChecks is enabled --- .../OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs index 64ed6f979b8..2975387929b 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs @@ -68,6 +68,12 @@ public static OrchardCoreBuilder AddDataAccess(this OrchardCoreBuilder builder) } var yesSqlOptions = sp.GetService>().Value; + + if (yesSqlOptions.EnableThreadSafetyChecks) + { + throw new InvalidOperationException("EnableThreadSafetyChecks IS ENABLED!!!"); + } + var databaseTableOptions = shellSettings.GetDatabaseTableOptions(); var storeConfiguration = GetStoreConfiguration(sp, yesSqlOptions, databaseTableOptions); From bc5b455a0cc4bc2f4797a9f1609c298dbf6645ef Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 09:02:23 -0700 Subject: [PATCH 5/8] fix build --- .../OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs index 2975387929b..64ed6f979b8 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs @@ -68,12 +68,6 @@ public static OrchardCoreBuilder AddDataAccess(this OrchardCoreBuilder builder) } var yesSqlOptions = sp.GetService>().Value; - - if (yesSqlOptions.EnableThreadSafetyChecks) - { - throw new InvalidOperationException("EnableThreadSafetyChecks IS ENABLED!!!"); - } - var databaseTableOptions = shellSettings.GetDatabaseTableOptions(); var storeConfiguration = GetStoreConfiguration(sp, yesSqlOptions, databaseTableOptions); From 794e87dc99760463e67b24bbe3ad966a4e2e3b4c Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 11:28:41 -0700 Subject: [PATCH 6/8] enable on YesSql --- .github/workflows/functional_all_db.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/functional_all_db.yml b/.github/workflows/functional_all_db.yml index c7f7f1a9a1d..5bd367aed80 100644 --- a/.github/workflows/functional_all_db.yml +++ b/.github/workflows/functional_all_db.yml @@ -50,6 +50,8 @@ jobs: runs-on: ubuntu-latest container: image: cypress/included:9.6.1 + env: + OrchardCore__OrchardCore_YesSql__EnableThreadSafetyChecks: true steps: - uses: actions/checkout@v4 # We need to install dotnet in the docker container. From 129383da0f141eca3621a5412f084f561318861a Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 11:31:00 -0700 Subject: [PATCH 7/8] throw exceptions --- .../OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs index 64ed6f979b8..27c82c2f510 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs @@ -68,6 +68,12 @@ public static OrchardCoreBuilder AddDataAccess(this OrchardCoreBuilder builder) } var yesSqlOptions = sp.GetService>().Value; + + if (yesSqlOptions.EnableThreadSafetyChecks) + { + throw new InvalidOperationException("EnableThreadSafetyChecks is enabled!!!"); + } + var databaseTableOptions = shellSettings.GetDatabaseTableOptions(); var storeConfiguration = GetStoreConfiguration(sp, yesSqlOptions, databaseTableOptions); From b0082e718fcc11d2304b1e9d345d9714b9131d43 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Fri, 17 May 2024 11:37:30 -0700 Subject: [PATCH 8/8] make all tests pass --- .../OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs index 27c82c2f510..2a03aa53609 100644 --- a/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs +++ b/src/OrchardCore/OrchardCore.Data.YesSql/OrchardCoreBuilderExtensions.cs @@ -69,11 +69,6 @@ public static OrchardCoreBuilder AddDataAccess(this OrchardCoreBuilder builder) var yesSqlOptions = sp.GetService>().Value; - if (yesSqlOptions.EnableThreadSafetyChecks) - { - throw new InvalidOperationException("EnableThreadSafetyChecks is enabled!!!"); - } - var databaseTableOptions = shellSettings.GetDatabaseTableOptions(); var storeConfiguration = GetStoreConfiguration(sp, yesSqlOptions, databaseTableOptions);