From 7464b7924d99a7cec07a56c9af98bf1cf2fd1c77 Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Tue, 9 Feb 2021 12:02:00 +0700 Subject: [PATCH] Print tables size during execution stage (#1479) --- eth/stagedsync/stage_execute.go | 6 ++++++ ethdb/kv_mdbx.go | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/eth/stagedsync/stage_execute.go b/eth/stagedsync/stage_execute.go index 3c876aef1..833cbb4a2 100644 --- a/eth/stagedsync/stage_execute.go +++ b/eth/stagedsync/stage_execute.go @@ -212,6 +212,9 @@ func SpawnExecuteBlocksStage(s *StageState, stateDB ethdb.Database, chainConfig if err = tx.CommitAndBegin(context.Background()); err != nil { return err } + if err = printBucketsSize(tx.(ethdb.HasTx).Tx()); err != nil { + return err + } chainContext.SetDB(tx) } } @@ -230,6 +233,9 @@ func SpawnExecuteBlocksStage(s *StageState, stateDB ethdb.Database, chainConfig if err = tx.CommitAndBegin(context.Background()); err != nil { return err } + if err = printBucketsSize(tx.(ethdb.HasTx).Tx()); err != nil { + return err + } chainContext.SetDB(tx) } start = time.Now() diff --git a/ethdb/kv_mdbx.go b/ethdb/kv_mdbx.go index c8aef3297..1873cedd6 100644 --- a/ethdb/kv_mdbx.go +++ b/ethdb/kv_mdbx.go @@ -671,10 +671,9 @@ func (tx *MdbxTx) printDebugInfo() { "id", txInfo.Id, "read_lag", txInfo.ReadLag, "ro", tx.readOnly, - "space_used_mb", txInfo.SpaceUsed/1024/1024, - "space_retired_mb", txInfo.SpaceRetired/1024/1024, + //"space_retired_mb", txInfo.SpaceRetired/1024/1024, "space_dirty_kb", txInfo.SpaceDirty/1024, - "callers", debug.Callers(8), + "callers", debug.Callers(7), ) } }