Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unreal SDK: no way to set confirmed reads on the connection (Rust SDK has with_confirmed_reads)

Đang mở Phù hợp với người mới
#6,328 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, unreal-engine
Lĩnh vực
game-dev, networking

Hướng nghiên cứu

Bắt đầu với UDbConnectionBuilderBase::Build trong sdks/unreal/src/SpacetimeDbSdk/Private/Connection/DbConnectionBuilder.cpp, sử dụng triển khai Rust trong sdks/rust/src/websocket.rs và db_connection.rs làm tham chiếu về hành vi. Thêm tùy chọn vào cả bộ dựng C++ và bộ dựng dành cho Blueprint, giữ nguyên việc bỏ qua khi chưa đặt và tuần tự hóa một giá trị boolean rõ ràng khi đã cấu hình. Hoàn thành nghĩa là confirmed=true hoặc confirmed=false được thêm đúng cách và được các bài kiểm thử Unreal SDK liên quan kiểm tra.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
25.3k
Fork
1.1k
Merge trung bình
2 ngày 18 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của clockworklabs/SpacetimeDB

Tất cả issue của clockworklabs/SpacetimeDB

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.