From ea99ea4a2d6b6a415935724802412689e08f95d9 Mon Sep 17 00:00:00 2001 From: flywukong <2229306838@qq.com> Date: Mon, 20 Nov 2023 13:02:39 +0900 Subject: [PATCH] fix: fix log --- ethdb/leveldb/leveldb.go | 3 +-- ethdb/pebble/pebble.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ethdb/leveldb/leveldb.go b/ethdb/leveldb/leveldb.go index 8585c20bce..c0e0eb250a 100644 --- a/ethdb/leveldb/leveldb.go +++ b/ethdb/leveldb/leveldb.go @@ -111,8 +111,7 @@ func NewCustom(file string, namespace string, customize func(options *opt.Option options := configureOptions(customize) logger := log.New("database", file) usedCache := options.GetBlockCacheCapacity() + options.GetWriteBuffer()*2 - logCtx := []interface{}{"cache", common.StorageSize(usedCache), - "handles", options.GetOpenFilesCacheCapacity(), "write buffer:", common.StorageSize(options.GetWriteBuffer())} + logCtx := []interface{}{"cache", common.StorageSize(usedCache), "handles", options.GetOpenFilesCacheCapacity()} if options.ReadOnly { logCtx = append(logCtx, "readonly", "true") } diff --git a/ethdb/pebble/pebble.go b/ethdb/pebble/pebble.go index cfd54a3fab..52285f4860 100644 --- a/ethdb/pebble/pebble.go +++ b/ethdb/pebble/pebble.go @@ -153,7 +153,7 @@ func New(file string, cache int, handles int, namespace string, readonly bool) ( } logger.Info("Allocated cache and file handles", "cache", common.StorageSize(cache*1024*1024), - "handles", handles, "memTable size:", common.StorageSize(memTableSize)) + "handles", handles, "memory table", common.StorageSize(memTableSize)) db := &Database{ fn: file,