-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## 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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
31 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters