Skip to content

Commit e187b64

Browse files
committed
fix: sqlite lock error (#2672)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved concurrency handling for image downloads, preventing duplicate downloads and enhancing performance. * Enhanced image pruning process for more efficient removal of outdated images. * **Refactor** * Updated internal mechanisms for managing ongoing downloads to use a more robust locking strategy. * Simplified and optimized SQL queries related to image cache management. * **Chores** * Updated database connection settings for better performance and reliability. * Removed an unused dependency to streamline the application. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9a28ea0 commit e187b64

File tree

4 files changed

+274
-225
lines changed

4 files changed

+274
-225
lines changed

packages/edge/infra/client/manager/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ rand = "0.8"
3030
rand_chacha = "0.3.1"
3131
reqwest = { version = "0.12", default-features = false, features = ["stream", "rustls-tls", "json"] }
3232
rivet-logs.workspace = true
33-
scc = "2.3.4"
3433
serde = { version = "1.0.195", features = ["derive"] }
3534
serde_json = "1.0.111"
3635
serde_yaml = "0.9.34"

packages/edge/infra/client/manager/src/ctx.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,8 +975,7 @@ impl Ctx {
975975
// Delete entries that aren't in our valid images table
976976
let deleted = sqlx::query(indoc!(
977977
"
978-
DELETE
979-
FROM images_cache
978+
DELETE FROM images_cache
980979
WHERE image_id NOT IN (
981980
SELECT image_id FROM __valid_images
982981
)

0 commit comments

Comments
 (0)