Do not perform external calls during a database transaction. #954
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!954
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/move-external-calls-without-tx"
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 codebase was used to correctly perform signatory calls during a database transaction, as the signatory was previously exclusively in process. However, a few months ago, it was changed to be a trait that can be either local or remote. Making external calls to services, adding latency, during an ongoing database transaction is a bad idea because it will lock the rows until the service call is finalized, which is unpredictable.
The issue is even worse in our pipeline where the SQLite storage driver is used with the ":memory:" path, which forces the Database pool to have a size of 1. Since our tests run in parallel, they would randomly fail.
This issue was failing in the CI, but the error was not making the pipeline fail. This bug was fixed as well.
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingIs this right? I think it should only be sqlite and why is it included in this pr?
Looks like https://github.com/cashubtc/cdk/pull/953 was wrong
should be fixed by https://github.com/cashubtc/cdk/pull/956
I think you'll just need to manually delete this change and force push
Done