-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
8
-
False
-
-
False
-
subs-swatch-thunder
-
-
Context
Currently, conflict resolution logic handles create/update events but needs enhancement to properly process INSTANCE_DELETED events. When an instance is deleted, the conflict resolution should negate metric values (convert positive to negative) while preserving the INSTANCE_DELETED event type through the processing pipeline.
This ensures that deleted instances are properly reflected in tally calculations by creating negative metric adjustments rather than ignoring the deletion event.
Acceptance Criteria
- INSTANCE_DELETED Support: Conflict resolution logic handles INSTANCE_DELETED event type
- Metric Negation: When processing deleted instances, metric values are negated (e.g., Cores: 4 becomes Cores: -4)
- Event Type Preservation: Incoming event type (INSTANCE_DELETED) is preserved when saving amendment records, not overwritten by conflict event type
- Persistence: Negated metrics for deleted instances are properly persisted to database
- Existing Logic Preserved: Create/update conflict resolution continues to work unchanged
- Test Coverage: Unit and integration tests cover INSTANCE_DELETED conflict scenarios
Key Issue: Event Type Preservation
The critical requirement is ensuring that when conflict resolution triggers, the amendment record saves with the incoming event type (INSTANCE_DELETED) rather than the event type from the conflicting record found in the database.
- blocks
-
SWATCH-3931 Build SQL Query Foundation for "Get Hosts From Events" Processing
-
- Refinement
-