mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
txn full fix - cursors leak (#1838)
This commit is contained in:
parent
87fa3d5102
commit
07a063cb8a
@ -657,6 +657,7 @@ func (tx *lmdbTx) Put(bucket string, k, v []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
return c.Put(k, v)
|
||||
}
|
||||
|
||||
@ -670,6 +671,7 @@ func (tx *lmdbTx) Delete(bucket string, k, v []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
return c.Delete(k, v)
|
||||
}
|
||||
err := tx.tx.Del(lmdb.DBI(b.DBI), k, v)
|
||||
|
@ -712,6 +712,7 @@ func (tx *MdbxTx) Put(bucket string, k, v []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
return c.Put(k, v)
|
||||
}
|
||||
|
||||
@ -725,6 +726,7 @@ func (tx *MdbxTx) Delete(bucket string, k, v []byte) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer c.Close()
|
||||
return c.Delete(k, v)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user