lnd/kvdb
Olaoluwa Osuntokun 43a1ca4f3d
kvdb/postgres: remove global application level lock
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.
2024-09-30 16:58:46 -07:00
..
etcd kvdb: make etcd calls timeout to ensure liveness 2024-08-01 19:04:10 +02:00
postgres kvdb/postgres: remove global application level lock 2024-09-30 16:58:46 -07:00
sqlbase kvdb/postgres: remove global application level lock 2024-09-30 16:58:46 -07:00
sqlite kvdb: add sqlite 2023-01-23 09:14:08 +02:00
backend_js.go kvdb: exclude anything bbolt related from JS builds 2021-07-22 09:47:37 +02:00
backend.go multi: replace ioutil.WriteFile 2024-04-25 11:23:31 +02:00
bolt_compact.go multi: wrap all errors 2024-04-11 15:04:03 +02:00
bolt_fixture.go kvdb: use T.TempDir to create temporary test directory 2022-08-24 09:03:04 +08:00
bolt_test.go kvdb: use T.TempDir to create temporary test directory 2022-08-24 09:03:04 +08:00
config.go kvdb+cmd: fix typos 2024-01-03 12:06:32 +08:00
debug.go multi: add golang 1.17 compatible build tags 2021-09-29 17:31:37 -07:00
etcd_test.go kvdb+docs: remove etcd test fixture cleanup calls 2023-01-24 09:23:50 +02:00
go.mod kvdb: update to latest walletdb version 2024-09-12 16:41:43 -07:00
go.sum kvdb: update to latest walletdb version 2024-09-12 16:41:43 -07:00
interface.go kvdb: add ForAll 2022-01-12 19:11:53 +01:00
kvdb_etcd.go kvdb: unify how the db backend for tests is set 2023-01-23 09:05:11 +02:00
kvdb_no_etcd.go kvdb: unify how the db backend for tests is set 2023-01-23 09:05:11 +02:00
kvdb_no_postgres.go multi: run go fmt with go 1.17 2021-11-08 22:39:41 +01:00
kvdb_no_sqlite.go kvdb: add sqlite 2023-01-23 09:14:08 +02:00
kvdb_postgres.go multi: run go fmt with go 1.17 2021-11-08 22:39:41 +01:00
kvdb_sqlite.go kvdb: add sqlite 2023-01-23 09:14:08 +02:00
log.go kvdb+refactor: move all general sqlite code to seprate dir 2023-01-23 09:05:11 +02:00
nodebug.go multi: add golang 1.17 compatible build tags 2021-09-29 17:31:37 -07:00
postgres_test.go kvdb: add ForAll 2022-01-12 19:11:53 +01:00
prefetch_test.go kvdb: extra test coverage for kvdb.Prefetch 2021-09-14 13:12:23 +02:00
readwrite_bucket_test.go kvdb+cmd: fix typos 2024-01-03 12:06:32 +08:00
readwrite_cursor_test.go kvdb/test: fix cursor tests to match bbolt semantics 2021-07-12 11:31:09 +02:00
readwrite_tx_test.go kvdb/test: generalize etcd tests 2021-07-12 11:31:05 +02:00
test_utils.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
test.go kvdb/test: generalize etcd tests 2021-07-12 11:31:05 +02:00