Skip to content

comments: surface a conflict when a reply loses a create race with different text #346

In review

Description

@bjornars

Gaia will answer the loser of two concurrent PUTs that create the same topic, comment or complication with 409 instead of a raw unique-violation error (novem-code/gaia#8065).

The reply helper (novem/comments.py:655) treats any 409 as "exists, update it" and POSTs its own text, so the loser of a race overwrites the winner. Overwriting is right when the caller is retrying its own write, but not when the existing content differs. Compare before POSTing, or raise a conflict error the caller can handle.

Activity

  1. added theissue type on Dec 6, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions