rivetkit 3.0: HTTP 400 overloaded on node pool upsert is treated as fatal and exits the process

オープン 初心者向け
#5,933 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust

調査の方向性

rivetkit-rust/packages/rivetkit-core/src/registry/runner_config.rs、特に response_error を読み、その再試行可能な結果が既存の再試行ループにどう届くかを追ってください。レスポンスボディのコード overloaded を再試行可能として扱い、その後、過負荷状態のノードプールの upsert を再現するレジストリ起動テストを確認してください。起動時に終了せず、このレスポンスを再試行するようになれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

In rivetkit 3.0.0-preview.3, a registry that starts against a local engine exits the process when the engine answers the node pool upsert with HTTP 400 overloaded. The engine marks that answer as retryable ("retry after 100 ms"), but the client treats it as fatal.

Where

rivetkit-rust/packages/rivetkit-core/src/registry/runner_config.rs, response_error. It classifies only 404, 429, 5xx and body code not_found as retryable. The engine answers a warming or busy storage host with:

400 Bad Request {"code":"overloaded","group":"depot","message":"The storage host refused the command (routing_unavailable); retry after 100 ms."}
400 Bad Request {"code":"overloaded","group":"depot","message":"The storage host refused the command (command_capacity); retry after 100 ms."}

That error goes to ensure_local_normal_runner_config, then to serveRegistry, and rivetkit/dist/tsup/mod.js calls process.exit(1) on "runtime registry serve errored".

Reproduction

Single local engine, rivet-engine 3.0.0-preview.3 on macOS arm64, file-system object storage, storage.auto_provision_partitions=1, storage.balancing.enabled=false (the same settings as engine_env in rivetkit-rust/packages/engine-process).

Send PUT /pools/default?namespace=default with body {"drain_on_version_upgrade":true} every 100 ms:

  • From engine start until about 1.7 s, every call gets overloaded (routing_unavailable).
  • With 1 call at a time after that, every call succeeds.
  • With 8 parallel calls, each round has one success and the other calls get overloaded (command_capacity), for as long as the loop runs.

So a registry that starts in the first ~1.7 s after the engine, or at the same time as another registry against the same engine, ends its process. In our test suite this failed 6 of 23 tests in one file.

Expected

Treat body code overloaded as AttemptError::Retryable, so the existing 60 x 500 ms retry loop covers it.

Workaround

Before registry.startAndWait(), we send the same PUT ourselves, retry it on overloaded, and start one registry at a time in the process.

主要言語
Rust
スター
6.5k
フォーク
291
平均マージ
18時間 45分
マージ済み PR(30日)
38

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rivet-dev/rivet のほかの issue

rivet-dev/rivet の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。