MergePipeline deadlocks on graceful shutdown if a merge actor fails before or during shutdown
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read quickwit/quickwit-indexing/src/actors/merge_pipeline.rs, focusing on perform_health_check and the handlers for FinishPendingMergesAndShutdownPipeline and Spawn. Trace the shutdown and retry paths described in the issue, then inspect nearby tests for merge pipeline supervision. Done means each listed interleaving exits the actor cleanly while the shutdown request still receives a successful reply.
索引モデルが issue の本文から書いたものです。
説明
Description
MergePipeline can hang indefinitely after receiving FinishPendingMergesAndShutdownPipeline when a child actor fails (e.g., transient object-storage or metastore error) either right before or during graceful shutdown.
Root Cause
In quickwit/quickwit-indexing/src/actors/merge_pipeline.rs:
perform_health_check(lines 404–428):- When
self.handles_optisNone, it returnsOk(())even ifself.shutdown_initiatedistrue. - When
Health::FailureOrUnhealthyoccurs, it callsself.terminate().await(settingself.handles_opt = None) and schedulesSpawn { retry_count: 0 }, even ifself.shutdown_initiatedistrue.
- When
Handler<FinishPendingMergesAndShutdownPipeline>(lines 480–515):- Sets
self.shutdown_initiated = true. Ifself.handles_optis currentlyNone(e.g., the pipeline just terminated after a failure and is waiting forSpawnbackoff, or initial spawn failed and is retrying), it takes theelsebranch and returnsOk(()).
- Sets
Handler<Spawn>(lines 519–529):- Sees
if self.shutdown_initiated { return Ok(()); }instead of exiting the actor.
- Sees
Once self.shutdown_initiated == true and self.handles_opt.is_none(), SuperviseLoop continues ticking every second forever and MergePipeline never terminates (blocking graceful shutdown / decommission until an external timeout kills it).
Triggering Interleavings
- Failure during shutdown:
FinishPendingMergesAndShutdownPipelinesetsshutdown_initiated = true-> a merge actor (e.g.,MergeSplitDownloader,Uploader,Publisher) fails on a transient storage/metastore error ->perform_health_checkterminates actors (handles_opt = None) and schedulesSpawn->SpawnreturnsOk(())->SuperviseLooploops forever. - Shutdown during failure backoff: A merge actor fails ->
perform_health_checkcallsself.terminate().await(handles_opt = None) and schedulesSpawnafterHEARTBEAT->FinishPendingMergesAndShutdownPipelinearrives beforeSpawn, seeshandles_opt = None, returnsOk(())->SpawnreturnsOk(())->SuperviseLooploops forever. - Shutdown during initial spawn retry:
spawn_pipeline()fails on a transient metastore error (handles_opt = None) and schedules retrySpawn->FinishPendingMergesAndShutdownPipelinearrives ->SuperviseLooploops forever.
Suggested Fix
In quickwit/quickwit-indexing/src/actors/merge_pipeline.rs:
- In
perform_health_check:- If
self.handles_optisNoneandself.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success). - On
Health::FailureOrUnhealthy, afterself.terminate().await, ifself.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success)instead of schedulingSpawn.
- If
- In
Handler<Spawn>:- If
self.shutdown_initiatedistrue, returnErr(ActorExitStatus::Success).
- If
(Keeping Handler<FinishPendingMergesAndShutdownPipeline> returning Ok(()) preserves clean ask(FinishPendingMergesAndShutdownPipeline) replies for callers, while the next SuperviseLoop / Spawn tick exits cleanly with ActorExitStatus::Success.)
- 主要言語
- 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
-
[M09] Silence parser misreads ffmpeg times in scientific notation (6.25e-05 → 6.25 s)対応中かも @G-darshan-32 が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
clipy-recorder/clipy#164 · コメント 1 件 ·
-
p2 ready-mac
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
quickwit-oss/tantivy#3299 ·
メンテナーはふだん 1 日以内に返信
-
P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
arcships/dim#2294 · コメント 1 件 ·
メンテナーはふだん 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 日以内に返信