Make import retry safe after ambiguous queue enqueue outcomes
Maintainer thường phản hồi trong vòng 1 ngà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
- 35/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ệ
- redis, typescript
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
Start by reading packages/trpc/src/routers/import.ts and apps/worker/src/jobs/import.ts, then inspect this repository's BullMQ version and its job lifecycle behavior. Add coverage for definite failures, ambiguous acknowledgements, duplicate retries, and any reconciliation path selected. Done means ambiguous outcomes cannot create concurrent jobs, definite failures remain retryable, and pending imports have documented recovery.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Requested by @mahmoud-samy as a follow-up to PR #519.
Problem
In packages/trpc/src/routers/import.ts, importRouter.retry changes an import from failed to pending before calling the BullMQ importQueue.add. If add rejects, the route restores failed, which addresses a definite enqueue failure. If Redis persisted the job but the acknowledgement was lost, the rollback can permit a second retry and concurrent jobs for the same import ID. Concurrent jobs can interfere with staging cleanup by import ID in apps/worker/src/jobs/import.ts. A pending import with no live job may also need recovery.
Proposed work
- Investigate this repository's BullMQ version and verify duplicate-job behavior for a deterministic
jobIdkeyed on the import ID. Account for job lifecycle and later retries so valid retries remain possible. - Make retry enqueue idempotent across ambiguous acknowledgements. Do not reset an import to
failedwhen a job might already have been persisted without confirming the outcome. - Assess whether a reconciliation process is necessary for
pendingimports that lack a live job. Implement one if needed, with a safe way to distinguish live, completed, and missing jobs. - Add tests for definite enqueue failures, ambiguous enqueue outcomes, duplicate retries, and reconciliation if implemented.
Acceptance criteria
- An ambiguous acknowledgement cannot cause two active import jobs for the same import ID.
- A definite enqueue failure remains retryable.
- Pending imports without a live job have a documented recovery path.
- Tests cover the selected recovery and idempotency behavior.
Related PR: https://github.com/Openpanel-dev/openpanel/pull/519
Original review comment: https://github.com/Openpanel-dev/openpanel/pull/519#discussion_r4116862559
- Ngôn ngữ chính
- TypeScript
- Star
- 7.1k
- Fork
- 500
- Merge trung bình
- 7 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Openpanel-dev/openpanel
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Openpanel-dev/openpanel#532 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Period comparison badge shows wrong percentage for decreases (100 → 50 shows ↓100%)Có thể đã có người làm @sarmah-rup đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Openpanel-dev/openpanel#526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Self-hosted missing op1-replay.jsCó thể đã có người làm @houstona đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Openpanel-dev/openpanel#512 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
login page needs refinementCó thể đã có người làm @anandghegde đã nhận 22 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Openpanel-dev/openpanel#495 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Openpanel-dev/openpanel#528 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Openpanel-dev/openpanel
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
umbraco/Umbraco-CMS-MCP-Dev#512 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
wimpysworld/sidra#290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
defuFn invokes function values for inherited default propertiesCó thể đã có người làm @xiehuanyi đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
feature request good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
TabularisDB/tabularis#853 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
capricorn86/happy-dom#2474 ·
Maintainer thường phản hồi trong vòng 2 ngày