fix copy: flush discards the transaction
This commit is contained in:
parent
4b0b37a4ef
commit
608a9f84d2
@ -409,6 +409,8 @@ func (b *Blockstore) doCopy(from, to *badger.DB, filter func(cid.Cid) bool) erro
|
|||||||
if err := batch.Flush(); err != nil {
|
if err := batch.Flush(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Flush discards the transaction, so we need a new batch
|
||||||
|
batch = to.NewWriteBatch()
|
||||||
count = 0
|
count = 0
|
||||||
putPooled()
|
putPooled()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user