Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/loud-melons-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/diagnostics-app': patch
---

Fixed bug where Rust client implementation would not update the dynamic schema after sync.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {
ColumnType,
DBAdapter,
isStreamingSyncCheckpoint,
isStreamingSyncCheckpointComplete,
isStreamingSyncCheckpointDiff,
isStreamingSyncCheckpointPartiallyComplete,
isStreamingSyncData,
PowerSyncControlCommand,
SqliteBucketStorage,
Expand Down Expand Up @@ -102,6 +104,12 @@ export class RustClientInterceptor extends SqliteBucketStorage {
});

await this.schemaManager.updateFromOperations(batch);
} else if (isStreamingSyncCheckpointPartiallyComplete(line) || isStreamingSyncCheckpointComplete(line)) {
// Refresh schema asynchronously, to allow us to better measure
// performance of initial sync.
setTimeout(() => {
this.schemaManager.refreshSchema(this.rdb);
}, 60);
}
}

Expand Down
Loading