mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-15 12:18:01 -04:00
fed2a9db3e502090e7d9bf3dfbb466dc0cd36687
## Description of Changes Unfortunately, none of our tests currently cover this, but while working on the V9 upgrade, I noticed that this code still relies on `type(Row)` as a unique table identifier. That no longer holds with multi-tables as several tables can share the same `Row` type. In that case, subscription updates would be grouped incorrectly and always applied to the same first table that uses `Row` for its data storage. This PR fixes that by using the table handle itself as a key (compared by reference). If transaction updates are already grouped uniquely by table, it should be possible to simplify this code much further, but I'm not sure if such guarantee exists, so leaving that untouched. ## API - [ ] This is an API breaking change to the SDK *If the API is breaking, please state below what will break* ## Requires SpacetimeDB PRs *List any PRs here that are required for this SDK change to work* ## Testsuite *If you would like to run the your SDK changes in this PR against a specific SpacetimeDB branch, specify that here. This can be a branch name or a link to a PR.* SpacetimeDB branch name: master ## Testing *Write instructions for a test that you performed for this PR* - [x] I did `dotnet test`, but as mentioned in the description, this requires adding tests for multi-table subscriptions, which I'm afraid I won't have time to do, so have to leave to follow-up devs. --------- Co-authored-by: james gilles <jameshgilles@gmail.com>
Description
Multiplayer at the speed of light
261 MiB
Languages
Rust
53.1%
C++
21.7%
TypeScript
14%
C#
7.8%
CSS
1.1%
Other
2%