-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
area:dataData import/export/migrationData import/export/migrationbugSomething isn't workingSomething isn't workingpriority:lowLow priorityLow priority
Description
Summary
TotalMissingCount in SchemaMismatchException is calculated in the constructor and could become stale.
Problem
In SchemaMismatchException.cs:30:
public SchemaMismatchException(...)
{
MissingColumns = missingColumns;
TotalMissingCount = missingColumns.Values.Sum(list => list.Count); // Calculated once
}If the dictionary is mutated after construction, TotalMissingCount becomes stale.
Solution
Calculate in property getter instead of constructor:
public int TotalMissingCount => MissingColumns.Values.Sum(list => list.Count);Files to Modify
src/PPDS.Migration/Exceptions/SchemaMismatchException.cs
Work Stream
Stream B - Code Patterns
Acceptance Criteria
- Property calculates on access
- Behavior unchanged for normal usage
- All existing tests pass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:dataData import/export/migrationData import/export/migrationbugSomething isn't workingSomething isn't workingpriority:lowLow priorityLow priority
Projects
Status
Todo