Skip to content

Conversation

@aasoni
Copy link
Contributor

@aasoni aasoni commented Jul 31, 2023

Description of Changes

Fixes the following issues with the serialization of the commit log:

  1. The deserialization of commit offset and min tx offset values were reversed
  2. The transaction count was added to the serialization of a commit. This wasn't currently an issue because every commit has a single transaction. However with multiple transactions this would lead to issues
  3. Empty transactions are not added to the commit log. This caused an inconsistency between the min tx offset value before and after serialization because empty transactions are serialized to 0 bytes, which when deserialized was interpreted as no transaction

API

  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI
  • This is a breaking change to the SDK API

If the API is breaking, please state below what will break
This isn't exactly a break in the APIs but it's a change in the serialization/deserialization of the commit log, which means that existing databases will not startup correctly with this change

@cloutiertyler cloutiertyler merged commit 38e3692 into master Jul 31, 2023
@cloutiertyler cloutiertyler deleted the alessandro/fix-commit-log-serial-deserial branch August 1, 2023 21:54
bfops pushed a commit that referenced this pull request Jul 16, 2025
bfops added a commit that referenced this pull request Jul 17, 2025
## Description of Changes

This creates a frankenstein monster of a repo that is compatible with
both .NET / MSBuild as well as can be consumed as a Unity package.

- `.meta` files, Unity manifests and Unity README were copied over from
the Unity repo.
- `examples` and `tests` folders were renamed to `examples~` and
`tests~` correspondingly, as the `~` suffix is the only way to get
entire folders ignored by Unity.
- MSBuild was configured to change `bin` and `obj` to `bin~` and `obj~`
for the same reasons. This doesn't matter for the Git repo, but helpful
for local development where you don't want Unity to try and load local
DLL artifacts.
- NuGet was configured to restore Unity-compatible NuGet DLLs (and
delete others) in a local folder and committed to the repo - so, from
now on, we can easily update them by modifying `.csproj` and via
standard `dotnet restore` / `dotnet build`.

After this change, this repo should be compatible with both .NET CLI
(e.g. `dotnet test`) as well as consumable from Unity, but due to amount
of metadata changes, it needs further testing before we merge repos
properly.

Fixes #114.

## 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*

---------

Co-authored-by: Zeke Foppa <[email protected]>
bfops pushed a commit that referenced this pull request Aug 7, 2025
bfops added a commit that referenced this pull request Aug 7, 2025
## Description of Changes

This creates a frankenstein monster of a repo that is compatible with
both .NET / MSBuild as well as can be consumed as a Unity package.

- `.meta` files, Unity manifests and Unity README were copied over from
the Unity repo.
- `examples` and `tests` folders were renamed to `examples~` and
`tests~` correspondingly, as the `~` suffix is the only way to get
entire folders ignored by Unity.
- MSBuild was configured to change `bin` and `obj` to `bin~` and `obj~`
for the same reasons. This doesn't matter for the Git repo, but helpful
for local development where you don't want Unity to try and load local
DLL artifacts.
- NuGet was configured to restore Unity-compatible NuGet DLLs (and
delete others) in a local folder and committed to the repo - so, from
now on, we can easily update them by modifying `.csproj` and via
standard `dotnet restore` / `dotnet build`.

After this change, this repo should be compatible with both .NET CLI
(e.g. `dotnet test`) as well as consumable from Unity, but due to amount
of metadata changes, it needs further testing before we merge repos
properly.

Fixes #114.

## 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*

---------

Co-authored-by: Zeke Foppa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants