Skip to content

feat(txn): carry abort reasons as structured gRPC error details #9866

Open

Description

@matthewmcneely

Follow-up to #9747.

#9747 reports why a transaction aborted as a category prefix on the codes.Aborted status message (conflict: Transaction has been aborted. Please retry. ...). Every client has to parse that prefix out of the message, and dgo (dgraph-io/dgo#288), dgraph4j (dgraph-io/dgraph4j#290), and pydgraph (dgraph-io/pydgraph#307) each carry their own copy of the parser and the category list.

This phase attaches the reason as structured detail using the gRPC rich error model: an errdetails.ErrorInfo on the status, with the category as Reason and a fixed Domain. Space in Metadata is reserved for the contended predicate once the server can name it.

  • No proto change in dgo/protos/api; the detail rides on the status.
  • Keep the message prefix in place so older clients and HTTP callers still work.
  • Clients prefer the ErrorInfo when present and fall back to the prefix.

Open questions: the Domain string, and whether HTTP responses carry the same fields under extensions.

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