diff --git a/.changeset/small-socks-lay.md b/.changeset/small-socks-lay.md new file mode 100644 index 000000000..5b45526b6 --- /dev/null +++ b/.changeset/small-socks-lay.md @@ -0,0 +1,5 @@ +--- +'@powersync/service-core': patch +--- + +Fix reported metrics for storage size > 2GB. diff --git a/packages/service-core/src/storage/MongoBucketStorage.ts b/packages/service-core/src/storage/MongoBucketStorage.ts index 3033122ca..e4a492bd2 100644 --- a/packages/service-core/src/storage/MongoBucketStorage.ts +++ b/packages/service-core/src/storage/MongoBucketStorage.ts @@ -347,9 +347,9 @@ export class MongoBucketStorage .catch(ignoreNotExiting); return { - operations_size_bytes: operations_aggregate[0].storageStats.size, - parameters_size_bytes: parameters_aggregate[0].storageStats.size, - replication_size_bytes: replication_aggregate[0].storageStats.size + operations_size_bytes: Number(operations_aggregate[0].storageStats.size), + parameters_size_bytes: Number(parameters_aggregate[0].storageStats.size), + replication_size_bytes: Number(replication_aggregate[0].storageStats.size) }; }