core/filtermaps: fix deadlock in writeFinishedMaps callback

This commit is contained in:
Zsolt Felfoldi 2025-03-19 00:53:21 +01:00
parent 666dbc19c6
commit 36a590baa7

View file

@ -392,7 +392,9 @@ func (r *mapRenderer) writeFinishedMaps(pauseCb func() bool) error {
}
// 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()
pauseCb()
r.f.indexLock.Lock()
batch = r.f.db.NewBatch()
}
}