Skip to content

Approval consumption is not compare-and-set, so concurrent resumes can race #121

Open

Description

@josh-butcher-index

_resume_ssp_distribution marks an approval consumed before creating the deal, but storage has no compare-and-set, so two truly simultaneous resumes can both pass the status check and both call create_deal (documented in a comment in approval_service.py). Additionally, if the racing duplicate create fails, the failure handler restores approved over the winner's consumed. Proposal: add an atomic transition to the storage interface (or a per-approval lock) and make the failure handler restore only if the status is still the one it set. Follow-up to #111.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions