multi: add global log for wallet db postgres back

This commit is contained in:
ziggie committed 2025-04-16 16:31:24 +02:00
1 parent 06f1ef47fa
commit 947702f6de
7 files changed
+70 -4

No files matched your search

+11
View File
@@ -55,6 +55,13 @@ type Config struct {
// commands. Note that the sqlite keywords to be replaced are
// case-sensitive.
SQLiteCmdReplacements SQLiteCmdReplacements
// WithTxLevelLock when set will ensure that there is a transaction
// level lock.
//
// NOTE: Temporary, should be removed when all parts of the LND code
// are more resilient against concurrent db access..
WithTxLevelLock bool
}
// db holds a reference to the sql db connection.
@@ -79,6 +86,10 @@ type db struct {
// top-level buckets that have keys that cannot be mapped to a distinct
// sql table.
table string
// lock is the global write lock that ensures single writer. This is
// only used if cfg.WithTxLevelLock is set.
lock sync.RWMutex
}
// Enforce db implements the walletdb.DB interface.