ingest v2: WAL truncation blocks persist/init_shards, causing ingest timeouts under load
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #6599 của @aanufriev-celonis — đã đóng, không 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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- rust
- Lĩnh vực
- backend, distributed-systems, performance
Hướng nghiên cứu
Bắt đầu tại EventSubscriber::handle_event và theo dõi lock_fully, persist cùng init_shards, sau đó tái hiện tình trạng tranh chấp trong quá trình ingestion liên tục với các lần cập nhật vị trí shard thường xuyên. Bản sửa được hoàn tất khi quá trình dọn dẹp WAL nhường khóa ingester giữa các đơn vị công việc nhỏ và persist/init_shards không còn hết thời gian chờ trong quá trình truncation; hãy xác minh bằng các bài kiểm thử ingest và concurrency liên quan.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
In ingest v2, the ingester's shard-positions gossip handler holds the ingester's global lock across an entire WAL-truncation pass, which blocks ingestion on that node while the pass runs.
EventSubscriber<ShardPositionsUpdate>::handle_event acquires the full ingester lock once (lock_fully) and holds it while it truncates/deletes every shard in the update.
persist and init_shards take that same lock. So the truncation pass is effectively a stop-the-world for that ingester, each truncate/delete performs WAL disk I/O, so on a node with many shards and/or a WAL on slower storage it can hold the lock for tens of seconds.
During that window:
-
incoming
persistrequests queue behind the lock and (our case) exceed client ingest timeouts; -
a concurrent
init_shards, auto-scale-up triggered by the same traffic surge, also blocks and times out, so the source cannot add capacity exactly when it needs to.
Steps to reproduce (if applicable)
This is a contention/timing issue, so it reproduces under load. Conditions that trigger it:
- Run an ingester (ingest v2) that leads many shards, ideally with the WAL on slower storage.
- Drive a sustained ingestion surge into a source so the control plane attempts to scale the source up while shard positions are actively gossiped (frequent
ShardPositionsUpdatetruncations). - Observe on that ingester: WAL lock-acquire warnings,
ShardPositionsUpdatehandler-budget warnings,failed to init shards ... request timed out.
Expected behavior
Background WAL cleanup driven by gossiped shard positions must not block ingestion for the duration of the whole pass. Ingest latency (and init_shards) should not spike to seconds/tens-of-seconds (up to 50 in our case) because a truncation pass is in progress. The cleanup should yield the ingester lock frequently enough that queued persist/init_shards calls can interleave, performing small units of work rather than the entire update.
Configuration:
quickwit:d33dd237f8250899c223bb2cd7997f005ed616fe
- Ngôn ngữ chính
- Rust
- Star
- 11.8k
- Fork
- 628
- Merge trung bình
- 2 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 50
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- 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 quickwit-oss/quickwit
-
area:otel documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quickwit-oss/quickwit#6686 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add some examples of requests in the REST API reference docsCó thể đã có người làm @Cunninger đã nhận 88 ngày trước. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quickwit-oss/quickwit#4266 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
quickwit-oss/quickwit#3872 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update docs on range queriesĐang mởdocumentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
quickwit-oss/quickwit#3666 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
implement retry for ListTermsĐang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
quickwit-oss/quickwit#2769 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quickwit-oss/quickwit
Issue tương tự
-
p2 ready-mac
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
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 82/100
quickwit-oss/tantivy#3299 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
vercel-labs/agent-browser#2797 ·
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 66/100
witchesofthehill/manabrew#1309 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug help wanted ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
userFRM/egui-charts#4494 ·
Maintainer thường phản hồi trong vòng 1 ngày