Flagsmith/flagsmith

Race condition in deleting segments

Open

#7354 aperta il 27 apr 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (264 fork)batch import
buggood first issue

Metriche repository

Star
 (3475 star)
Metriche merge PR
 (Merge medio 3g 7h) (157 PR mergiate in 30 g)

Descrizione

Acceptance Criterion

  • The asynchronous task delete_segment ignores it when the segment is already deleted.

Sentry Issue: FLAGSMITH-API-5NB

Segment.DoesNotExist: Segment matching query does not exist.
(3 additional frame(s) were not displayed)
...
  File "segments/tasks.py", line 14, in delete_segment
    Segment.objects.get(pk=segment_id).delete()

Failed to execute task 'tasks.delete_segment', with id 410046727. Exception: Segment matching query does not exist.

Guida contributor