Handle duplicate setting, feature and permission records - #26209
Merged
Merged
Conversation
maliming
marked this pull request as ready for review
September 24, 2026 07:08
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #26209 +/- ##
==========================================
+ Coverage 49.90% 49.95% +0.04%
==========================================
Files 3842 3843 +1
Lines 135458 135679 +221
Branches 10271 10282 +11
==========================================
+ Hits 67597 67774 +177
- Misses 65823 65867 +44
Partials 2038 2038 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
EngincanV
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #26208
SettingManagementStoreandFeatureManagementStoreno longer throw on duplicate records: reads use the recordFindAsyncreturns and saves delete the extra ones. Revoking a permission now deletes all matching grants.Concurrent first saves can still insert duplicate rows. The unique index doesn't cover rows with a NULL
ProviderKey, because EF Core adds anIS NOT NULLfilter to it on SQL Server. On SQL Server, you can stop this at the database level:Keep one row for each setting (the one with the value you want) and delete the others by
Id.builder.ConfigureSettingManagement(), then add a new migration: