-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MongoDB Bucket Storage Module #136
Conversation
…rework-teardown # Conflicts: # packages/service-core/src/routes/endpoints/admin.ts
…e-zero-lsn-from-storage
…storage Removed Postgres ZeroLSN from BucketStorage
…rework-teardown # Conflicts: # packages/service-core/src/routes/endpoints/checkpointing.ts
# Conflicts: # modules/module-postgres/src/module/PostgresModule.ts # packages/service-core/src/api/diagnostics.ts # packages/service-core/src/replication/AbstractReplicationJob.ts # packages/service-core/src/replication/ReplicationModule.ts # packages/service-core/src/routes/endpoints/admin.ts # packages/service-core/src/routes/endpoints/sync-rules.ts # packages/service-core/src/system/ServiceContext.ts # packages/service-core/test/src/sync.test.ts # packages/types/src/config/PowerSyncConfig.ts
Implement powersync instance teardown functionality
…ture # Conflicts: # packages/service-core/src/routes/endpoints/socket-route.ts # pnpm-lock.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some initial comments on locks and migrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the structure here looks good to me.
One thing I'm wondering about in regards to the module structure - would it perhaps work better to create separate modules for replication vs storage?
One specific place this has an effect is with tests: Currently we have for example the mysql module with a devDependency on the mongodb module, so that the mongodb storage can be used with mysql tests. But we probably want to test all combinations of postgres/mongodb/mysql replication with mongodb/postgres storage. The dependency structure between the modules may start getting weird if we implement that.
Overview
This moves the Mongo DB
BucketStorage
implementation out of the@powersync/service-core
package to a new MongoDB Storage module.This PR also aims to move all MongoDB specific functionality to the MongoDB module. This includes:
Shared unit tests for the
BucketStorageFactory
are exported from the new@powersync/service-core-tests
package. These tests are used for testing the MongoDB and Postgres bucket storage factories.