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

Đang mở
#9,867 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 10 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, grpc
Lĩnh vực
api, databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
21.8k
Fork
1.6k
Merge trung bình
11 ngày 7 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dgraph-io/dgraph

Tất cả issue của dgraph-io/dgraph

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.