mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
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 <garyrong0905@gmail.com>
This commit is contained in:
parent
046e2cd7a4
commit
92fbbe63c8
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue