-
Notifications
You must be signed in to change notification settings - Fork 140
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
Move conflicting dictionary key to new dictionary in unique storage path #3227
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit df7be40 Collapsed results for better readability
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3227 +/- ##
==========================================
- Coverage 80.78% 80.76% -0.03%
==========================================
Files 380 380
Lines 93509 93524 +15
==========================================
- Hits 75541 75532 -9
- Misses 15267 15291 +24
Partials 2701 2701
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
The dictionary migration might encounter a key conflict: when a key is migrated, the dictionary might have previously stored values for both unmigrated key and migrated key (if this was possible; e.g. for run-time type values with intersection type where interfaces are in unnormalized order, or string value with unnmormalized encoding, etc.).
In such a case, instead of just reporting an error and failing the migration of the dictionary, create a new dictionary with the same type as the migrated dictionary, store it under a new unique storage path that indicates its purpose, and move the conflicting key-pair into this new dictionary.
master
branchFiles changed
in the Github PR explorer