From 18da1c713d8903ab615a383b570c503a699959d5 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 28 Feb 2023 10:58:09 +0800 Subject: [PATCH] ethdb/pebble: fix max memorytable size --- ethdb/pebble/pebble.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethdb/pebble/pebble.go b/ethdb/pebble/pebble.go index fdad13b392e..f5a9493dfda 100644 --- a/ethdb/pebble/pebble.go +++ b/ethdb/pebble/pebble.go @@ -130,7 +130,7 @@ func New(file string, cache int, handles int, namespace string, readonly bool) ( // The max memtable size is limited by the uint32 offsets stored in // internal/arenaskl.node, DeferredBatchOp, and flushableBatchEntry. // Taken from https://github.com/cockroachdb/pebble/blob/master/open.go#L38 - maxMemTableSize := 4 << 30 // 4 GB + maxMemTableSize := 4<<30 - 1 // Capped by 4 GB // Two memory tables is configured which is identical to leveldb, // including a frozen memory table and another live one.