mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
43a1ca4f3d
In this commit, we remove the global application level lock from the postgres backend. This lock prevents multiple write transactions from happening at the same time, and will also block a writer if a read is on going. Since this lock was added, we know always open DB connections with the strongest level of concurrency control available: `LevelSerializable`. In concert with the new auto retry logic, we ensure that if db transactions conflict (writing the same key/row in this case), then the tx is retried automatically. Removing this lock should increase perf for the postgres backend, as now concurrent write transactions can proceed, being serialized as needed. Rather then trying to handle concurrency at the application level, we'll set postgres do its job, with the application only needing to retry as necessary. |
||
---|---|---|
.. | ||
etcd | ||
postgres | ||
sqlbase | ||
sqlite | ||
backend_js.go | ||
backend.go | ||
bolt_compact.go | ||
bolt_fixture.go | ||
bolt_test.go | ||
config.go | ||
debug.go | ||
etcd_test.go | ||
go.mod | ||
go.sum | ||
interface.go | ||
kvdb_etcd.go | ||
kvdb_no_etcd.go | ||
kvdb_no_postgres.go | ||
kvdb_no_sqlite.go | ||
kvdb_postgres.go | ||
kvdb_sqlite.go | ||
log.go | ||
nodebug.go | ||
postgres_test.go | ||
prefetch_test.go | ||
readwrite_bucket_test.go | ||
readwrite_cursor_test.go | ||
readwrite_tx_test.go | ||
test_utils.go | ||
test.go |