Unreal SDK: no way to set confirmed reads on the connection (Rust SDK has with_confirmed_reads)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 84/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp, unreal-engine
- 領域
- game-dev, networking
調査の方向性
sdks/unreal/src/SpacetimeDbSdk/Private/Connection/DbConnectionBuilder.cpp の UDbConnectionBuilderBase::Build から始め、sdks/rust/src/websocket.rs と db_connection.rs の Rust 実装を動作の参照として使用する。このオプションを C++ と Blueprint 公開の両方のビルダーに追加し、未設定の場合は省略を保持し、設定されている場合は明示的な boolean をシリアライズする。完了の基準は、confirmed=true または confirmed=false が正しく追加され、関連する Unreal SDK のテストで検証されることである。
索引モデルが issue の本文から書いたものです。
説明
SpacetimeDB 2.12.0, Unreal SDK from sdks/unreal/src/SpacetimeDbSdk at v2.12.0, UE 5.8.3.
The Rust SDK lets the client choose the read mode explicitly: DbConnectionBuilder::with_confirmed_reads(bool) adds &confirmed=true|false to the subscribe URL (sdks/rust/src/websocket.rs, db_connection.rs). The Unreal SDK has no equivalent: UDbConnectionBuilderBase::Build (Private/Connection/DbConnectionBuilder.cpp) always builds
<uri>/v1/database/<name>/subscribe?compression=<Gzip|None>
so the mode is whatever the server default is for the protocol. With v2.bsatn.spacetimedb (which the Unreal SDK uses, Websocket.cpp) the server default is confirmed = true (client-api/src/routes/subscribe.rs, DEFAULT_CONFIRMED_READS), which is what we want, but we can't pin it from the client.
Why it matters for us: our game logic treats "reducer reply received" as "the transaction is durable" (inventory, trades, store purchases are only shown as done after the reply). If the default ever changes, or a different protocol version is negotiated, Unreal clients would silently switch to replies-before-fsync, while our Rust tools keep true explicitly.
Request: add WithConfirmedReads(bool) to UDbConnectionBuilder (and the Blueprint builder), appending &confirmed=true|false only when it was set, mirroring the Rust SDK. We can send a PR if that helps.
Workaround today: none without patching the SDK (the database name is interpolated into the path, so a query parameter can't be injected cleanly). We rely on the v2 default and check it in our load tests.
- 主要言語
- Rust
- スター
- 25.3k
- フォーク
- 1.1k
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 67
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clockworklabs/SpacetimeDB のほかの issue
-
TS SDK: failed procedure calls reject with a bare string instead of an Error対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
clockworklabs/SpacetimeDB#6288 ·
メンテナーはふだん 1 日以内に返信
-
TypeScript server `ctx.random()`: first draw of every transaction is heavily biased (signed shift in `pcg32` seeding)対応中かも @Tyagiquamar が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
clockworklabs/SpacetimeDB#6247 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
clockworklabs/SpacetimeDB#6146 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
clockworklabs/SpacetimeDB#5985 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
clockworklabs/SpacetimeDB#5943 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
clockworklabs/SpacetimeDB の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
-
Negative subscript on a sparse array counts from the number of elements, not from the highest indexオープンarea: compat bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
reubeno/brush#1570 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
longbridge/gpui-kit#3620 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
mongodb/kingfisher#564 ·
メンテナーはふだん 1 日以内に返信