powersync-ja / powersync-service

Other
123 stars 9 forks source link

fix: Cached Parsed Sync Rules #114

Closed stevensJourney closed 6 days ago

stevensJourney commented 6 days ago

Overview

The MongoSyncBucketStorage's getParsedSyncRules method currently caches the parsed sync rules with the assumption that the previously cached Sync rules were generated with the same options. This assumption is not always true.

In some cases an external module could request parsed Sync rules without knowing the exact defaultSchema. This external request should not affect subsequent requests for parsed Sync rules. Currently this behaviour breaks syncing for schemas which are different from the cached schema.

changeset-bot[bot] commented 6 days ago

🦋 Changeset detected

Latest commit: 81bc3cb43d61ee53987ec1678bf9a8bd3d9b5565

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

This PR includes changesets to release 6 packages | Name | Type | | ---------------------------------- | ----- | | @powersync/service-core | Patch | | @powersync/service-module-mongodb | Patch | | @powersync/service-module-mysql | Patch | | @powersync/service-module-postgres | Patch | | @powersync/service-image | Patch | | test-client | 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