Skip to content

Conversation

simolus3
Copy link
Contributor

This reverts the bucket batch API to only accept regular input rows (instead of SqliteInputRows that need additional context to be evaluated). As a consequence, the source streams (BinLogStream, ChangeStream, WalStream) are now responsible for applying the context (which is not a problem because they keep a reference to the sync rules).

Applying the conversion as early as possible fixes issues when a CustomSqliteValue is used in a primary key, because we'd serialize it to BSON in that case. It also simplifies the bucket implementation just a tiny bit.

This also applies a small optimization to applyRowContext to avoid copying the row if it contains no custom values.

Copy link

changeset-bot bot commented Sep 10, 2025

🦋 Changeset detected

Latest commit: 12828f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@powersync/service-module-postgres Patch
@powersync/service-module-mongodb Patch
@powersync/service-core Patch
@powersync/service-module-mysql Patch
@powersync/service-sync-rules Patch
@powersync/service-schema Patch
@powersync/service-image Patch
@powersync/service-core-tests Patch
@powersync/service-module-core Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-postgres-storage Patch
test-client Patch
@powersync/service-jpgwire Patch
@powersync/lib-services-framework Patch
@powersync/lib-service-postgres Patch
@powersync/service-rsocket-router Patch
@powersync/lib-service-mongodb Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@simolus3 simolus3 requested a review from rkistner September 10, 2025 14:12
Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, confirmed this fixes the issue.

I added a test that failed on versions 1.15.0 -> 1.15.5, confirming that this has the same replica identity behavior as 1.14.0.

Copy link

@johnshearar johnshearar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for Ralf's changes

@simolus3 simolus3 merged commit 221289d into main Sep 10, 2025
21 checks passed
@simolus3 simolus3 deleted the consistent-input-conversion branch September 10, 2025 14:59
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