mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-28 14:47:16 +00:00
Revert "mdbx: proper atomic close (#827)"
This reverts commit 493ae8b083
.
This commit is contained in:
parent
493ae8b083
commit
8f3178f2f2
@ -431,9 +431,10 @@ func (db *MdbxKV) openDBIs(buckets []string) error {
|
||||
// Close closes db
|
||||
// All transactions must be closed before closing the database.
|
||||
func (db *MdbxKV) Close() {
|
||||
if db.closed.CompareAndSwap(false, true) {
|
||||
if db.closed.Load() {
|
||||
return
|
||||
}
|
||||
db.closed.Store(true)
|
||||
db.wg.Wait()
|
||||
db.env.Close()
|
||||
db.env = nil
|
||||
|
Loading…
Reference in New Issue
Block a user