From 03b0c5ec46850132ba094d0145aab1b867c2f229 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Mon, 23 Dec 2024 10:50:13 +0200 Subject: [PATCH 1/2] Handle storage metrics > 2GB. --- packages/service-core/src/storage/MongoBucketStorage.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) }; } From 53741fb7252e77068a06c2ac8ad569865d850fd8 Mon Sep 17 00:00:00 2001 From: Ralf Kistner Date: Mon, 23 Dec 2024 10:53:29 +0200 Subject: [PATCH 2/2] Add changeset. --- .changeset/small-socks-lay.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/small-socks-lay.md 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.