Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3930

Update Conflict Resolution to Support INSTANCE_DELETED Events

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • 8
    • False
    • Hide

      None

      Show
      None
    • 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.

              Unassigned Unassigned
              lburnett0 Lindsey Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: