mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
core/filtermaps: close batch after write in map renderer
This commit is contained in:
parent
a0fb8102fe
commit
7a2f48fe4f
1 changed files with 2 additions and 0 deletions
|
|
@ -410,6 +410,7 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
|
||||||
if err := batch.Write(); err != nil {
|
if err := batch.Write(); err != nil {
|
||||||
log.Crit("Error writing log index update batch", "error", err)
|
log.Crit("Error writing log index update batch", "error", err)
|
||||||
}
|
}
|
||||||
|
batch.Close()
|
||||||
// do not exit while in partially written state but do allow processing
|
// do not exit while in partially written state but do allow processing
|
||||||
// events and pausing while block processing is in progress
|
// events and pausing while block processing is in progress
|
||||||
r.f.indexLock.Unlock()
|
r.f.indexLock.Unlock()
|
||||||
|
|
@ -509,6 +510,7 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
|
||||||
if err := batch.Write(); err != nil {
|
if err := batch.Write(); err != nil {
|
||||||
log.Crit("Error writing log index update batch", "error", err)
|
log.Crit("Error writing log index update batch", "error", err)
|
||||||
}
|
}
|
||||||
|
batch.Close()
|
||||||
totalTime += time.Since(start)
|
totalTime += time.Since(start)
|
||||||
mapWriteTimer.Update(totalTime)
|
mapWriteTimer.Update(totalTime)
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue