feat(txn): add an abort reason field to TxnContext

オープン
#9,867 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 10 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, grpc
領域
api, databases

調査の方向性

Start with the api.TxnContext definition and the abort handling paths named in the issue: CommitOrAbort and doMutate in edgraph. Read the related work in #9747 and #9866, then trace how unary gRPC errors reach clients. Done means the API design is settled and the proto, server, and four named clients consistently expose the abort reason; this requires coordinated cross-repository changes.

索引モデルが issue の本文から書いたものです。

説明

Follow-up to #9747 and #9866.

Once the abort reason is carried as structured detail (#9866), promote it to a first-class field on api.TxnContext in the dgo proto, e.g. an AbortReason enum plus an optional detail string. Every language client then gets typed access from generated code instead of status parsing.

This needs a coordinated release:

  • proto change and regen in dgraph-io/dgo
  • server populates the field in edgraph (CommitOrAbort, doMutate)
  • dgraph4j, pydgraph, dgraph-js, and dgo read it

The catch is that gRPC drops the response message when a unary handler returns an error, which is how aborts come back today. The field is only visible if aborts return a TxnContext with a nil error, which changes how every client detects an abort. Settle that before committing to the field.

主要言語
Go
スター
21.8k
フォーク
1.6k
平均マージ
11日 7時間
マージ済み PR(30日)
5

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dgraph-io/dgraph のほかの issue

dgraph-io/dgraph の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。