A stored payload that does not deserialize keeps the reaper in a loop
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #90 của @codingjoe — đã merge
Đá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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, distributed-systems
Hướng nghiên cứu
Start in threadmill/backends/redis.py at RedisBroker._reap_task and compare its deserialization failure path with the replaced Lua reaper's finalize step. Trace the raw JSON fields and verify that an undeserializable task is finalized as FAILED, publishes a result, and is not re-claimed indefinitely.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found by the SuperJoe review of the lease-expiry retry patch (4ec9068..d5a1fdb).
RedisBroker._reap_task deserializes the stored task before it decides the fate of the task:
# threadmill/backends/redis.py
data = self.backend.client.hget(task_key, "data")
if data is None:
logger.warning("Claimed task %r has no task data; skipping", task_id)
return
task_result = self.backend.deserialize_task_result(data)
deserialize_task_result imports the task and its retry callback from the serialized dotted paths. A deployment can remove or rename the callback while the task waits in the queue. Then the import fails and the call raises on every pass. The surrounding logger.exception only writes a log record. The claim stays:
- The reaper claims the task again every
CLAIM_TTLand the same error occurs. - The task never reaches
FAILEDand never publishes a result. - Only expiry of the task hash or a late acknowledgement removes the running entry.
The replaced Lua reaper decoded the same payload with cjson and finalized it as FAILED without any import. This error is a regression from that rewrite.
Suggested correction: add a salvage branch to the reap path. The branch finalizes a payload that the code cannot deserialize. The raw JSON already carries status, errors, and the task fields. Patch it and publish it as FAILED. A small Lua script that copies the finalize step of the old reaper can do this. Then the behavior matches the pre-rewrite state and the retry decision does not return to Lua.
- Ngôn ngữ chính
- Python
- Star
- 19
- Fork
- 1
- Merge trung bình
- 14 giờ 39 phút
- Pull request đã merge (30 ngày)
- 21
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọ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 codingjoe/threadmill
-
Add worker pool telemetryCó thể làm lại được @codingjoe đã nhận 100 ngày trước và không có pull request nào đang mở. Đang mởenhancement
codingjoe/threadmill#18 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codingjoe/threadmill
Issue tương tự
-
first
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
AcademySoftwareFoundation/rmtc#54 · 1 bình luận ·
-
feature/cohorts feature/feature-flags team/feature-flags
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
License examples/ as MITCó thể đã có người làm @PGrayCS đã nhận hôm nay. Đang mởdocumentation enhancement example good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
speedyk-005/yasbd-lib#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
interactions-py/interactions.py#1827 ·
-
Managed start can fail when OpenVMM reads its control capability before NVX writes itCó thể đã có người làm @ppenna đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày