ingest v2: WAL truncation blocks persist/init_shards, causing ingest timeouts under load
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #6599 @aanufriev-celonis による — マージされずにクローズ
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust
調査の方向性
EventSubscriber::handle_event から開始し、lock_fully、persist、init_shards を追跡してから、shard position の更新を頻繁に行う継続的な取り込み中に競合を再現します。WAL のクリーンアップが小さな作業単位の間で ingester のロックを譲り、切り詰め中に persist/init_shards がタイムアウトしなくなったら修正完了です。関連する取り込みテストと並行性テストで検証してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Rust
- スター
- 11.8k
- フォーク
- 628
- 平均マージ
- 2日 22時間
- マージ済み PR(30日)
- 50
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quickwit-oss/quickwit のほかの issue
-
area:otel documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quickwit-oss/quickwit#6686 ·
メンテナーはふだん 1 日以内に返信
-
Add some examples of requests in the REST API reference docs対応中かも @Cunninger が 88 日前に担当しました。 オープンenhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quickwit-oss/quickwit#4266 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
quickwit-oss/quickwit#3872 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
quickwit-oss/quickwit#3666 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
quickwit-oss/quickwit#2769 ·
メンテナーはふだん 1 日以内に返信
quickwit-oss/quickwit の issue をすべて見る
似ている issue
-
p2 ready-mac
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
quickwit-oss/tantivy#3299 ·
メンテナーはふだん 1 日以内に返信
-
`stream enable` fails with "already enabled" on every fresh session since streaming became always-onオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
vercel-labs/agent-browser#2797 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
witchesofthehill/manabrew#1309 ·
メンテナーはふだん 1 日以内に返信
-
bug help wanted ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
userFRM/egui-charts#4494 ·
メンテナーはふだん 1 日以内に返信