From 7a492d5c0317c00998af08e316eb34cf6452b209 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 27 Aug 2018 17:08:18 +0200 Subject: [PATCH] Trim file offset to 4 bytes --- packages/db-diskdown/src/store/Combined.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/db-diskdown/src/store/Combined.ts b/packages/db-diskdown/src/store/Combined.ts index dbfa9737b..3cb7beb86 100644 --- a/packages/db-diskdown/src/store/Combined.ts +++ b/packages/db-diskdown/src/store/Combined.ts @@ -36,7 +36,7 @@ type Value = Key & { valueAt: number }; -const UINT_SIZE = 6; // 48-bit, the max Node supports +const UINT_SIZE = 4; // 4GB total size (max allowed here is 6 as per Nodejs) const KEY_SIZE = 32; const KEY_TOTAL_SIZE = KEY_SIZE + UINT_SIZE + UINT_SIZE; const ENTRY_SIZE = 1 + UINT_SIZE;