-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1836: Fix SQLite panic when syncing many UTXOs by enabling WAL…
… journal mode 7c4850f release: bump version to 0.30.2 (Steve Myers) 1065511 fix(sqlite): set connection journal_mode to WAL and busy_timeout to 5000 ms (Steve Myers) 344fa3f test: repro bug with large num utxos and sqlite (Steve Myers) 957b219 deps: downgrade dev dep electrsd to 0.24.0 (Steve Myers) 3b38892 ci: fix pinned rustls and add ci/pin-msrv.sh (Steve Myers) Pull request description: ### Description fixes #1827 replaces #1828 I changed the `SqliteDatabase` struct to create new rusqlite `Connection`s with [WAL](https://www.sqlite.org/wal.html) journal mode enabled and 5000ms busy_timeout. This prevents a large sync from trying to start and commit a batch (db transaction) while the initial non-batch connection is still busy writing it's data. ### Notes to the reviewers I commented out the `electrum::test_electrum_large_num_utxos` test since it takes an hour to run. Before the fix in thie PR it would also fail with only 10 large TX. The dev dependency and pinning changes were required to run the new, and other tests. ### Changelog notice - Fix SQLite panic when syncing many UTXOs ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### Bugfixes: * [ ] This pull request breaks the existing API * [x] I've added tests to reproduce the issue which are now passing * [x] I'm linking the issue being fixed by this PR ACKs for top commit: ValuedMammal: utACK 7c4850f nymius: tACK 7c4850f evanlinjin: utACK 7c4850f Tree-SHA512: ad10b8b4354bdcbc5b9aeb1d06f68f30501dcf4ed687b387f514ff7de5e034b729dbdf25f59a8b269e562f0dab8992aa187bf187e3e0adf585838ae96afb40cc
- Loading branch information
Showing
7 changed files
with
221 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -euo pipefail | ||
|
||
# Pin dependencies for MSRV | ||
|
||
# To pin deps, switch toolchain to MSRV and execute the below updates | ||
|
||
# cargo clean | ||
# rustup override set 1.63.0 | ||
cargo update -p tokio --precise "1.38.1" | ||
cargo update -p tokio-util --precise "0.7.11" | ||
cargo update -p home --precise "0.5.5" | ||
cargo update -p regex --precise "1.7.3" | ||
cargo update -p security-framework-sys --precise "2.11.1" | ||
cargo update -p url --precise "2.5.0" | ||
cargo update -p rustls@0.23.23 --precise "0.23.19" | ||
cargo update -p hashbrown@0.15.2 --precise "0.15.0" | ||
cargo update -p ureq --precise "2.10.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters