erigon-pulse/erigon-lib/kv/mdbx
battlmonstr 1914b52de0
mdbx: race conditions in MdbxKV.Close (#8409) (#9244)
In the previous code WaitGroup db.wg.Add(), Wait() and db.closed were
not treated in sync. In particular, it was theoretically possible to
first check closed, then set closed and Wait, and then call wg.Add()
while waiting (leading to WaitGroup panic).
In theory it was also possible that db.env.BeginTxn() is called on a
closed or nil db.env, because db.wg.Add() was called only after BeginTxn
(db.wg.Wait() could already return).

WaitGroup is replaced with a Cond variable.
Now it is not possible to increase the active transactions count on a
closed database. It is also not possible to call BeginTxn on a closed
database.
2024-01-17 15:28:37 +01:00
..
kv_abstract_test.go remotedbserver: add support for bor snapshots (#9180) 2024-01-09 14:48:01 +00:00
kv_mdbx_temporary.go Add RPC daemon using Silkworm (#8486) 2023-10-18 06:37:16 +07:00
kv_mdbx_test.go mdbx: race conditions in MdbxKV.Close (#8409) (#9244) 2024-01-17 15:28:37 +01:00
kv_mdbx.go mdbx: race conditions in MdbxKV.Close (#8409) (#9244) 2024-01-17 15:28:37 +01:00
kv_migrator_test.go move NewHashBatch to erigon-lib, remove oddb package (#8408) 2023-10-09 15:47:54 +07:00
util.go rpcdaemon: must not create db - because doesn't know right parameters (#8445) 2023-10-12 14:11:46 +07:00