snapshot: iteration and buffering optimizations

This commit is contained in:
Martin Holst Swende
2019-10-23 15:19:02 +02:00
committed by Péter Szilágyi
parent d7d81d7c12
commit cdf3f016df
5 changed files with 96 additions and 17 deletions

View File

@ -227,9 +227,6 @@ func (dl *diffLayer) flatten() snapshot {
// This is meant to be used during shutdown to persist the snapshot without
// flattening everything down (bad for reorgs).
func (dl *diffLayer) Journal() error {
dl.lock.RLock()
defer dl.lock.RUnlock()
writer, err := dl.journal()
if err != nil {
return err