mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
ethdb: update annotation and log
This commit is contained in:
parent
8e55f91630
commit
063191d68c
1 changed files with 3 additions and 4 deletions
|
|
@ -303,12 +303,11 @@ func (db *LDBDatabase) meter(refresh time.Duration) {
|
||||||
lastWriteDelay = time.Now()
|
lastWriteDelay = time.Now()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If leveldb's compaction has been going on for a long time, print a warning log here.
|
// If a warning that db is performing compaction has been displayed, any subsequent
|
||||||
// If a warning that db is performing compaction has been displayed,
|
// warnings will be withheld for one minute not to overwhelm the user.
|
||||||
// any subsequent warnings will be withhold for 1 minute to don't overwhelm the user.
|
|
||||||
if paused && delayN-delaystats[0] == 0 && duration.Nanoseconds()-delaystats[1] == 0 &&
|
if paused && delayN-delaystats[0] == 0 && duration.Nanoseconds()-delaystats[1] == 0 &&
|
||||||
time.Now().After(lastWritePaused.Add(writeDelayWarningThrottler)) {
|
time.Now().After(lastWritePaused.Add(writeDelayWarningThrottler)) {
|
||||||
db.log.Warn("Database is performing the compaction, all write operations will be paused")
|
db.log.Warn("Database compacting, degraded performance")
|
||||||
lastWritePaused = time.Now()
|
lastWritePaused = time.Now()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue