Flagsmith/flagsmith

Race condition in deleting segments

クローズ

#7,354 opened on 2026/04/27

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)Python (264 件のフォーク)batch import
buggood first issue

Repository metrics

Stars
 (3,475 個のスター)
PR merge metrics
 (平均マージ 3d 7h) (30d で 157 merged PRs)

説明

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.

コントリビューターガイド