One slow handler stalls the outbox, and each delivery queries the default locale

Đang mở
#3,303 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
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
backend

Hướng nghiên cứu

Start with src/FluentCMS.Core/Events/OutboxDrainer.cs and the worker registration in DependencyInjection/FluentCmsServiceCollectionExtensions.cs; the issue also names EventOperation.cs, JobExecutor.cs, OutboxKick.cs, and OutboxDrainJob.cs. Review the related job store behavior and coordinate with #3282, which changes the same drain. Done means meeting all five acceptance criteria and adding tests for each.

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

Mô tả

area:events performance type:bug

Problem

  1. One slow handler stalls every handler. The outbox queue has one worker (DependencyInjection/FluentCmsServiceCollectionExtensions.cs:285) and a drain delivers rows one at a time (Events/OutboxDrainer.cs:59-71), so a handler that takes the 60 s DeliveryTimeout holds back all the others.
  2. Each delivery and each job run queries the default locale. Events/EventOperation.cs:19-22 and Jobs/JobExecutor.cs:248-251 read Site.DefaultLocale uncached.
  3. A failed drain suppresses kicks. Events/OutboxKick.cs:24 treats any pending drain job as already queued without looking at RunAt. After a failure the retry is pending in the future (Jobs/JobStore.cs:153-154), so delivery falls back to the every-minute drain for about 7 minutes.
  4. The idle recurring drain writes rows every minute. Events/OutboxDrainJob.cs:103 inserts a job and an attempt row per minute, kept 7 days: about 10,000 of each on an idle instance.

Paths are under src/FluentCMS.Core/.

Proposal

  • Deliver in parallel per handler name, keeping order within a handler.
  • Read the default locale through the site cache.
  • Count only a drain job that is due as already queued.
  • Skip the bookkeeping of the recurring drain when nothing is due, or shorten its retention.

Done together with #3282, which changes the same drain.

Acceptance

  • A handler that blocks does not delay deliveries to other handlers
  • Order within one handler is unchanged
  • Delivering a batch reads the default locale once per site
  • A kick after a failed drain is delivered without waiting for the recurring drain
  • An idle instance does not accumulate drain rows
  • Tests for each

Found in the code review of 17 Nov 2026.

Ngôn ngữ chính
C#
Star
569
Fork
107
Merge trung bình
2 giờ 49 phút
Pull request đã merge (30 ngày)
397

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 fluentcms/FluentCMS

Tất cả issue của fluentcms/FluentCMS

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.