From 92fbbe63c8453d2497f6fc1f939439ef241c8467 Mon Sep 17 00:00:00 2001 From: GarmashAlex Date: Thu, 11 Sep 2025 11:05:17 +0300 Subject: [PATCH] ethdb/pebble: set metric namespace correctly (#32563) Ensure Database.namespace is initialized in pebble.New(...). Without this, the write-stall metrics registered in onWriteStallBegin/End are emitted without the intended namespace prefix, while other Pebble metrics use the provided constructor parameter. This aligns stall metrics with the rest of the Pebble metric set and fixes inconsistent metric naming. --------- Co-authored-by: rjl493456442 --- ethdb/pebble/pebble.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ethdb/pebble/pebble.go b/ethdb/pebble/pebble.go index 2370d4654f..8abe7d4bc7 100644 --- a/ethdb/pebble/pebble.go +++ b/ethdb/pebble/pebble.go @@ -218,9 +218,10 @@ func New(file string, cache int, handles int, namespace string, readonly bool) ( memTableSize = maxMemTableSize - 1 } db := &Database{ - fn: file, - log: logger, - quitChan: make(chan chan error), + fn: file, + log: logger, + quitChan: make(chan chan error), + namespace: namespace, // Use asynchronous write mode by default. Otherwise, the overhead of frequent fsync // operations can be significant, especially on platforms with slow fsync performance