Skip to content

Conversation

@ziggie1984
Copy link
Collaborator

@ziggie1984 ziggie1984 commented Nov 26, 2025

backports #10394

@ziggie1984 ziggie1984 force-pushed the backport/add-back-globallock branch from dd44b40 to 45ea9d6 Compare November 27, 2025 20:10
@ziggie1984 ziggie1984 marked this pull request as ready for review November 27, 2025 20:11
@ziggie1984 ziggie1984 force-pushed the backport/add-back-globallock branch from 45ea9d6 to 6d99e68 Compare November 28, 2025 07:55
Add two configuration options to control global lock usage for
different postgres database backends:

- ChannelDBWithGlobalLock: for channeldb access (default: false)
- WalletDBWithGlobalLock: for wallet database access (default: true)

These allow fine-grained control over which databases use global
locks, rather than hardcoding the behavior. This is a temporary
measure until the revocation log and wallet are migrated to native
SQL and become fully concurrent-safe.
@ziggie1984 ziggie1984 force-pushed the backport/add-back-globallock branch 2 times, most recently from 1d1ccc7 to e8a803b Compare November 28, 2025 08:35
Replace hardcoded WithGlobalLock assignment with configurable
options wallet postgres backends. Also add the WithGlobalLock
option to the channeldb table for postgres backends.

Defaults:
- channeldb: false (allow concurrent access)
- wallet: true (maintain safe single-writer behavior)

Users can now override these defaults via:
- db.postgres.channeldb-with-global-lock
- db.postgres.walletdb-with-global-lock

This gives operators flexibility while maintaining safe defaults
until full native SQL migration is complete.

Moreover exclude db.postgres.walletdb-with-global-lock check
in the sample config file script. We cannot easily check the
correct default because we set it later in the LND startup
sequence so we exclude it.
@ziggie1984 ziggie1984 force-pushed the backport/add-back-globallock branch from e8a803b to 6bdfb1d Compare November 28, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant