Terminal finalizes fail with unique conflict when a duplicate holds the claim

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

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
postgresql, rust
Lĩnh vực
backend, databases

Hướng nghiên cứu

Start with awa/tests/snooze_unique_conflict_test.rs and the finalize paths for queue storage and canonical storage. Add reproductions for completion, exhausted retries or terminal failure, DLQ moves, and handler-returned cancellation on both engines. Each test should show that the attempt reaches a terminal state while the newer duplicate keeps the uniqueness claim.

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

Mô tả

Follow-up to #807 (fixed for snooze, retry-after and retryable-error backoff in #808).

A unique job whose states mask claims a terminal state (completed, failed, cancelled) but not running releases its claim while it runs, so an identical job can be enqueued and take the claim. When the first job then finalizes into a state its mask claims, the finalize must take the claim back, conflicts, and rolls back: the attempt stays running until stale-receipt rescue, as #807 described for snooze.

Affected finalizes, on both queue storage and canonical storage:

  • completion (completed in the mask);
  • retries exhausted and terminal failure (failed);
  • move to the DLQ (failed);
  • handler-returned cancel (cancelled).

#808 handles the deferred-successor case by recording the attempt as cancelled as a duplicate. These paths need an equivalent decision for each target state: for example, finalize with the uniqueness fields stripped, as rescue duplicate cancellation does, so the newer job keeps the claim and the attempt still reaches a terminal state. Each needs a reproduction in the style of awa/tests/snooze_unique_conflict_test.rs on both engines.

Ngôn ngữ chính
Rust
Star
37
Fork
8
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
244

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 hardbyte/awa

Tất cả issue của hardbyte/awa

Issue tương tự

Thêm issue về Rust

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.