fix: batch proof witness queries in check_state to prevent pool exhaustion #1514
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!1514
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "debug_state_check"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The check_state function was making N individual database queries (one per
proof) inside a try_join_all loop. With many proofs, this spawned concurrent
queries that exhausted PostgreSQL's connection pool, causing timeouts.
This worked fine with SQLite (in-process, serialized) but failed with
PostgreSQL (network connections, fixed pool size).
Changes:
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingLGTM.
Backport failed for
v0.14.x, because it was unable to cherry-pick the commit(s).Please cherry-pick the changes locally and resolve any conflicts.