Skip to content

Commit 4ab0174

Browse files
committed
Merge branch 'optimize-bucket-lookups-2' into optimize-write-checkpoints
2 parents b05970a + 4dc78b8 commit 4ab0174

File tree

21 files changed

+114
-20
lines changed

21 files changed

+114
-20
lines changed

Diff for: .changeset/chilly-flowers-fix.md

-7
This file was deleted.

Diff for: modules/module-mongodb-storage/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @powersync/service-module-mongodb-storage
22

3+
## 0.7.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [f049f68]
8+
- Updated dependencies [8601d6c]
9+
- @powersync/service-core@1.9.0
10+
311
## 0.7.1
412

513
### Patch Changes

Diff for: modules/module-mongodb-storage/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@powersync/service-module-mongodb-storage",
33
"repository": "https://github.com/powersync-ja/powersync-service",
44
"types": "dist/index.d.ts",
5-
"version": "0.7.1",
5+
"version": "0.7.2",
66
"main": "dist/index.js",
77
"license": "FSL-1.1-Apache-2.0",
88
"type": "module",

Diff for: modules/module-mongodb/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @powersync/service-module-mongodb
22

3+
## 0.7.2
4+
5+
### Patch Changes
6+
7+
- 535e708: Increase connection timeouts for MongoDB "Test Connection".
8+
- Updated dependencies [f049f68]
9+
- Updated dependencies [8601d6c]
10+
- @powersync/service-core@1.9.0
11+
312
## 0.7.1
413

514
### Patch Changes

Diff for: modules/module-mongodb/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@powersync/service-module-mongodb",
33
"repository": "https://github.com/powersync-ja/powersync-service",
44
"types": "dist/index.d.ts",
5-
"version": "0.7.1",
5+
"version": "0.7.2",
66
"main": "dist/index.js",
77
"license": "FSL-1.1-Apache-2.0",
88
"type": "module",

Diff for: modules/module-mongodb/src/module/MongoModule.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,9 @@ export class MongoModule extends replication.ReplicationModule<types.MongoConnec
6666
const connectionManager = new MongoManager(normalizedConfig, {
6767
// Use short timeouts for testing connections.
6868
// Must be < 30s, to ensure we get a proper timeout error.
69-
socketTimeoutMS: 1_000,
70-
serverSelectionTimeoutMS: 1_000
69+
// It must be large enough to cover the high latency of testing connections across regions
70+
socketTimeoutMS: 3_000,
71+
serverSelectionTimeoutMS: 5_000
7172
});
7273
try {
7374
await checkSourceConfiguration(connectionManager);

Diff for: modules/module-mysql/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @powersync/service-module-mysql
22

3+
## 0.5.2
4+
5+
### Patch Changes
6+
7+
- 8601d6c: [MySQL] Fix errors being hidden by ROLLBACK failure
8+
- Updated dependencies [f049f68]
9+
- Updated dependencies [8601d6c]
10+
- @powersync/service-core@1.9.0
11+
312
## 0.5.1
413

514
### Patch Changes

Diff for: modules/module-mysql/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@powersync/service-module-mysql",
33
"repository": "https://github.com/powersync-ja/powersync-service",
44
"types": "dist/index.d.ts",
5-
"version": "0.5.1",
5+
"version": "0.5.2",
66
"license": "FSL-1.1-Apache-2.0",
77
"main": "dist/index.js",
88
"type": "module",

Diff for: modules/module-mysql/src/replication/BinLogStream.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export class BinLogStream {
136136
await this.snapshotTable(connection.connection, batch, result.table);
137137
await promiseConnection.query('COMMIT');
138138
} catch (e) {
139-
await promiseConnection.query('ROLLBACK');
139+
await tryRollback(promiseConnection);
140140
throw e;
141141
}
142142
} finally {
@@ -292,7 +292,7 @@ AND table_type = 'BASE TABLE';`,
292292
logger.info(`Initial replication done`);
293293
await promiseConnection.query('COMMIT');
294294
} catch (e) {
295-
await promiseConnection.query('ROLLBACK');
295+
await tryRollback(promiseConnection);
296296
throw e;
297297
} finally {
298298
connection.release();
@@ -653,3 +653,11 @@ AND table_type = 'BASE TABLE';`,
653653
}
654654
}
655655
}
656+
657+
async function tryRollback(promiseConnection: mysqlPromise.Connection) {
658+
try {
659+
await promiseConnection.query('ROLLBACK');
660+
} catch (e) {
661+
logger.error('Failed to rollback transaction', e);
662+
}
663+
}

Diff for: modules/module-postgres-storage/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @powersync/service-module-postgres-storage
22

3+
## 0.5.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [f049f68]
8+
- Updated dependencies [8601d6c]
9+
- @powersync/service-core@1.9.0
10+
- @powersync/service-core-tests@0.7.2
11+
312
## 0.5.1
413

514
### Patch Changes

Diff for: modules/module-postgres-storage/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@powersync/service-module-postgres-storage",
33
"repository": "https://github.com/powersync-ja/powersync-service",
44
"types": "dist/@types/index.d.ts",
5-
"version": "0.5.1",
5+
"version": "0.5.2",
66
"main": "dist/index.js",
77
"type": "module",
88
"publishConfig": {

Diff for: modules/module-postgres/CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @powersync/service-module-postgres
22

3+
## 0.10.0
4+
5+
### Minor Changes
6+
7+
- f049f68: [Postgres] Only flush once per replicated chunk, increasing transaction replication throughput.
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [f049f68]
12+
- Updated dependencies [8601d6c]
13+
- @powersync/service-core@1.9.0
14+
315
## 0.9.1
416

517
### Patch Changes

Diff for: modules/module-postgres/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publishConfig": {
66
"access": "public"
77
},
8-
"version": "0.9.1",
8+
"version": "0.10.0",
99
"main": "dist/index.js",
1010
"license": "FSL-1.1-Apache-2.0",
1111
"type": "module",

Diff for: packages/service-core-tests/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @powersync/service-core-tests
22

3+
## 0.7.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [f049f68]
8+
- Updated dependencies [8601d6c]
9+
- @powersync/service-core@1.9.0
10+
311
## 0.7.1
412

513
### Patch Changes

Diff for: packages/service-core-tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publishConfig": {
66
"access": "public"
77
},
8-
"version": "0.7.1",
8+
"version": "0.7.2",
99
"main": "dist/index.js",
1010
"license": "FSL-1.1-Apache-2.0",
1111
"type": "module",

Diff for: packages/service-core/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @powersync/service-core
22

3+
## 1.9.0
4+
5+
### Minor Changes
6+
7+
- f049f68: [Postgres] Only flush once per replicated chunk, increasing transaction replication throughput.
8+
9+
### Patch Changes
10+
11+
- 8601d6c: [MySQL] Fix errors being hidden by ROLLBACK failure
12+
313
## 1.8.1
414

515
### Patch Changes

Diff for: packages/service-core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"publishConfig": {
66
"access": "public"
77
},
8-
"version": "1.8.1",
8+
"version": "1.9.0",
99
"main": "dist/index.js",
1010
"license": "FSL-1.1-Apache-2.0",
1111
"type": "module",

Diff for: service/CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# @powersync/service-image
22

3+
## 1.9.0
4+
5+
### Minor Changes
6+
7+
- f049f68: [Postgres] Only flush once per replicated chunk, increasing transaction replication throughput.
8+
9+
### Patch Changes
10+
11+
- 8601d6c: [MySQL] Fix errors being hidden by ROLLBACK failure
12+
- Updated dependencies [f049f68]
13+
- Updated dependencies [8601d6c]
14+
- Updated dependencies [535e708]
15+
- @powersync/service-module-postgres@0.10.0
16+
- @powersync/service-core@1.9.0
17+
- @powersync/service-module-mysql@0.5.2
18+
- @powersync/service-module-mongodb@0.7.2
19+
- @powersync/service-module-mongodb-storage@0.7.2
20+
- @powersync/service-module-postgres-storage@0.5.2
21+
322
## 1.8.1
423

524
### Patch Changes

Diff for: service/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@powersync/service-image",
3-
"version": "1.8.1",
3+
"version": "1.9.0",
44
"private": true,
55
"license": "FSL-1.1-Apache-2.0",
66
"type": "module",

Diff for: test-client/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# test-client
22

3+
## 0.1.31
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [f049f68]
8+
- Updated dependencies [8601d6c]
9+
- @powersync/service-core@1.9.0
10+
311
## 0.1.30
412

513
### Patch Changes

Diff for: test-client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "test-client",
33
"repository": "https://github.com/powersync-ja/powersync-service",
44
"private": true,
5-
"version": "0.1.30",
5+
"version": "0.1.31",
66
"main": "dist/index.js",
77
"bin": "dist/bin.js",
88
"license": "Apache-2.0",

0 commit comments

Comments
 (0)