-
Notifications
You must be signed in to change notification settings - Fork 52
feat(mongodb-storage)!: chunked multi-op bucket documents with range-merging compaction and invariant tests #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sleepful
wants to merge
110
commits into
main
Choose a base branch
from
compressed-bucket-storage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 95 commits
Commits
Show all changes
110 commits
Select commit
Hold shift + click to select a range
2b5d09b
chore(mongodb-storage): duplicate v3 implementation as v5 baseline
Sleepful 1658885
Mechanically rename v5 storage symbols from V3 to V5
Sleepful d248875
feat(mongodb-storage): adapt v5 data model for compressed bucket storage
Sleepful 7f23aae
feat(mongodb-storage): add post-query filtering for merged v5 documents
Sleepful f57de0c
feat(mongodb-storage): implement range merging compaction for v5
Sleepful f1d9086
feat(mongodb-storage): optimize v5 checksums with document-level aggr…
Sleepful 8309ea9
test(core): adapt compacting data invalidate checkpoint test for v5 s…
Sleepful 3d33dd6
test(core): adapt batch has_more (3) test for v5 document grouping se…
Sleepful 755fad1
fix(tests): exclude v5 from Postgres test versions and clean up v5 sn…
Sleepful 926c9f5
refactor(mongodb-storage): setup directory structure for v3/v5 extrac…
Sleepful 3763f99
refactor(mongodb-storage): extract document format adapters for v3 an…
Sleepful 09563c8
refactor(mongodb-storage): extract shared query builder functions
Sleepful 1824b49
refactor(mongodb-storage): extract bucket data chunking utility
Sleepful bacaa39
refactor(mongodb-storage): extract shared batch write logic
Sleepful e63fe1b
refactor(mongodb-storage): extract shared bucket data read logic
Sleepful fce39ca
refactor(mongodb-storage): extract shared checksum aggregation helpers
Sleepful 4d9e6f9
refactor(mongodb-storage): extract shared compaction scaffolding
Sleepful 83a5d00
refactor(mongodb-storage): parameterize identical v3/v5 modules
Sleepful ea2788a
refactor(mongodb-storage): final cleanup after v3/v5 extraction
Sleepful 2f4eaf2
refactor(mongodb-storage): remove duplicate chunkBucketData from v5-f…
Sleepful cfd798e
refactor(mongodb-storage): parameterize MongoSyncBucketStorageV3/V5
Sleepful 25a44be
refactor(module-mongodb-storage): rename MongoSyncBucketStorage → Abs…
Sleepful 642acdf
refactor(module-mongodb-storage): lift collectionFilter and deleteFil…
Sleepful 2e5eb45
refactor(module-mongodb-storage): extract MongoSyncBucketStorageCallb…
Sleepful 3bd7217
Inline storage-operations into MongoSyncBucketStorage
Sleepful e0a26a1
refactor(module-mongodb-storage): inline writeBucketStateUpdates into…
Sleepful bde8166
Unify v3/v5 auxiliary model types into common/models.ts
Sleepful 352f21f
refactor(module-mongodb-storage): remove MongoParameterLookupV3/V5 re…
Sleepful 2a45d43
Follow-up: delete dead read-operations.ts, rename MongoSyncBucketStor…
Sleepful 12d8075
refactor: polish v5 MongoDB storage and shared modules
Sleepful 6ac700e
refactor(module-mongodb-storage): modernize loops in MongoSyncBucketS…
Sleepful 6277a0b
refactor(module-mongodb-storage): extract extractRowsFromDocument to …
Sleepful 5f15e4d
docs(module-mongodb-storage): add explanatory comments to casts and w…
Sleepful f675566
docs(module-mongodb-storage): add JSDoc to VersionedPowerSyncMongo wr…
Sleepful cebac8c
refactor: delete V5 surface layer and rename V5 format types
Sleepful 216d07e
refactor: inline shared storage into MongoSyncBucketStorageV3
Sleepful def2799
refactor: rewrite V3 compactor with V5 range-merging logic
Sleepful e1eae5e
refactor: rewrite V3 checksums with V5 document-level aggregation
Sleepful 3cd9cfb
refactor: consolidate shared helpers and remove version branching
Sleepful 09793e6
refactor: cleanup types after V5 merge into V3
Sleepful 695b57b
test: update configs and snapshots after V5 merge into V3
Sleepful 3c13953
chore: cleanup casts, imports, and add changeset for V5 merge into V3
Sleepful 4ce8880
refactor: remove dead callbacks parameter and TODO from AbstractMongo…
Sleepful bb4111e
refactor: type flushBucketDataShared formatAdapter parameter
Sleepful 6c7903a
test: use backend capability flag instead of version check for compre…
Sleepful 93b7fa9
refactor: deduplicate RegExp prefix matching into shared collectionsB…
Sleepful 5f4f5b0
chore: remove .gitkeep files from populated directories
Sleepful f24fd66
Merge remote-tracking branch 'origin/main' into compressed-bucket-sto…
Sleepful d80f55b
test: add Phase 1.5 read filtering boundary tests
Sleepful 5206db0
test: add Phase 1.5 compaction boundary tests
Sleepful 037a81e
fix: resolve V3 read filtering and compaction edge cases
Sleepful a8b7c20
Merge upstream/main (e2bf1ad9) into compressed-bucket-storage
Sleepful ad7e48a
fix: post-merge compilation fixes for upstream/main integration
Sleepful 1030e96
chore: fix formatting for CI
Sleepful 85bc040
chore: update changeset description to match PR messaging
Sleepful 48d668b
Merge upstream/main (15e24668) into compressed-bucket-storage
Sleepful 6c117a7
Remove dead $sort stage from V3 checksum aggregation pipeline
Sleepful b231209
Restructure bucket data query for compound _id index efficiency
Sleepful 4810a78
Convert superseded ops to MOVE tombstones in V3 compactor
Sleepful bf33d43
Add tests for MOVE tombstone gap coverage
Sleepful f960baf
Fix stale comment in V3 compactor dedup block
Sleepful 6d3f47a
test: add checksum pipeline straddling tests
Sleepful 03d8bd6
fix: handle upper-bound straddling in createBucketFilter checksum que…
Sleepful e19229a
test: add streaming compactor red tests
Sleepful e11badb
feat: implement streaming V3 compactor with batched reads and scoped …
Sleepful b4328cc
test: add red test for sandwiched non-processable doc deletion bug
Sleepful 65f5b39
fix: use individual _id delete instead of continuous range in streami…
Sleepful 3341ae1
fix: streaming compactor refinement — test gaps, stale comments, last…
Sleepful 7b0a4f8
refactor: collapse single-use V3 abstractions into their sole consumers
Sleepful f4dfd09
refactor: merge VersionedPowerSyncMongo into VersionedPowerSyncMongoV3
Sleepful dcf4700
refactor: delete source-record-store-impl.ts, use SourceRecordStoreV3…
Sleepful 459f2c1
refactor: relocate document-formats/ into v3/document-formats/
Sleepful fb23fad
refactor: return V3 implementation to main-branch shape
Sleepful 8086070
merge: upstream/main into compressed-bucket-storage
Sleepful 83012c2
fix: resolve merge artifacts — stale names, generic type params, acce…
Sleepful c9cd610
refactor: rename AbstractMongoSyncBucketStorage back to MongoSyncBuck…
Sleepful 138c421
refactor: replace ambiguous any/unknown types with concrete V3 types
Sleepful aa0380c
refactor: remove redundant compressedBucketStorage flag from producti…
Sleepful 1eac79b
refactor: restore BucketStateDocumentV3 suffix on V3 state type
Sleepful 94c9bc6
refactor: restore V3 suffixes on CurrentBucket/RecordedLookup/Current…
Sleepful b425628
test: add V3 compactor edge-case tests for maxOpId filtering and rang…
Sleepful f4da7a4
fix: preserve ops above maxOpId during V3 compaction
Sleepful e5c0043
fix: guard V3 compaction against concurrent modification
Sleepful 1b8d481
fix: correct CurrentBucket import in storage_sync test
Sleepful 3fc271c
chore: rename BucketDataDocument to BucketDataDocumentV3 in comments
Sleepful bf45882
feat: implement V3 CLEAR pass
Sleepful 28d7f9a
test: verify CLEAR document carries target_op from collapsed MOVEs
Sleepful 5f96a54
fix: propagate doc-level target_op to decoded ops in loadBucketDataDo…
Sleepful 7505bf6
merge: upstream/main into compressed-bucket-storage
Sleepful b9fa301
chore: fix storeCurrentData test for V3 suffix removal
Sleepful d679a90
refactor: drop unnecessary generics from V3 checksum helpers
Sleepful 6e4b774
chore: format after generics refactor
Sleepful 360bea3
Merge remote-tracking branch 'origin/main' into compressed-bucket-sto…
rkistner 897f2be
Post-merge fixes.
rkistner c4ded3b
refactor: move computePartialChecksumsForCollection out of base class
Sleepful 59edb4a
chore: remove unnecessary collection casts in MongoChecksumsV3
Sleepful 0e2110f
chore: remove unused resolvedDefinitionId param and lowerBound from c…
Sleepful 625df1b
fix: wrap combinedChecksum to 32-bit with addChecksums in CLEAR pass
Sleepful 172f4c5
chore: fix changeset package name
Sleepful 263517e
chore: make cleanupDroppedSourceTables abstract, remove unused listSo…
Sleepful 2f66882
chore: remove unused chunkSizeBytes variable
Sleepful f138861
fix: set cursorOptions to optimize sparse case in bucket reads
Sleepful 9c80ce0
chore: revert V3-specific test changes in registerSyncTests
Sleepful b1ad13d
fix: filter maxOpId from MOVE pass accumulator checksum, bytes, and c…
Sleepful eca4f05
chore: delete and regenerate stale v5 snapshots
Sleepful 0b69368
fix: wrap expectedChecksum with addChecksums in CLEAR verify aggregate
Sleepful e0bb0f7
test: verify compacted_state.checksum excludes pass-through ops
Sleepful d279167
revert: remove maxOpId filter from MOVE pass accumulator
Sleepful 65f1635
Revert "revert: remove maxOpId filter from MOVE pass accumulator"
Sleepful 3493dc4
Fix edge case with emtpy bucket results. (#672)
rkistner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@powersync/module-mongodb-storage': minor | ||
| '@powersync/service-core': minor | ||
| --- | ||
|
|
||
| Introduce chunked multi-op bucket documents with invariants and read-filtering tests in MongoDB storage. | ||
|
|
||
| Streaming V3 compactor — process buckets incrementally with byte-bounded batches, scoped deletes, and bounded transactions. Add `moveBatchByteLimit` option to `CompactOptions`. | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.