Add new overload for `EnableRetryOnFailure` that allows to pass in `maxRetryCount` and `maxRetryDelay`.

Đang mở
#3,268 1 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 1 ngày

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, postgresql
Lĩnh vực
database

Hướng nghiên cứu

Start with the EnableRetryOnFailure overloads in src/EFCore.PG/Infrastructure/NpgsqlDbContextOptionsBuilder.cs, especially the location linked in the issue, and read the TODO in src/EFCore.PG/NpgsqlRetryingExecutionStrategy.cs for context. Done means the options builder offers an overload taking maxRetryCount and maxRetryDelay without requiring errorCodesToAdd; check the related tests for the expected overload behavior.

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

Mô tả

blocked

None of the four available overloads allow to pass just the max retry count (int) and max delay (TimeSpan). The closest fit to this, is an overload that accepts (int, TimeSpan, ICollection<string>?) where the last parameter is errorCodesToAdd.

Since the purpose of the parameter errorCodesToAdd is unclear and the use of the backing field seems to be a work in progress per the TODO comment at the bottom of NpgsqlRetryingExecutionStrategy.cs, there should be an overload that ignores the existence of said field.

https://github.com/npgsql/efcore.pg/blob/e31994185bee5ff05d06676c872911eeb11f8ae0/src/EFCore.PG/Infrastructure/NpgsqlDbContextOptionsBuilder.cs#L201

Ngôn ngữ chính
C#
Star
1.8k
Fork
268
Merge trung bình
2 giờ 35 phút
Pull request đã merge (30 ngày)
136

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 npgsql/efcore.pg

Tất cả issue của npgsql/efcore.pg

Issue tương tự

Thêm issue về C#

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.