mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +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 {
|
||||
log.Crit("Error writing log index update batch", "error", err)
|
||||
}
|
||||
batch.Close()
|
||||
// do not exit while in partially written state but do allow processing
|
||||
// events and pausing while block processing is in progress
|
||||
r.f.indexLock.Unlock()
|
||||
|
|
@ -509,6 +510,7 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
|
|||
if err := batch.Write(); err != nil {
|
||||
log.Crit("Error writing log index update batch", "error", err)
|
||||
}
|
||||
batch.Close()
|
||||
totalTime += time.Since(start)
|
||||
mapWriteTimer.Update(totalTime)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue