Skip to content

Commit b1aff7d

Browse files
committed
Test corrosion under larger cache
1 parent de88d37 commit b1aff7d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

crates/corro-types/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 2;
1515
pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 15;
1616

1717
const fn default_apply_queue() -> usize {
18-
100
18+
500
1919
}
2020

2121
const fn default_reaper_interval() -> usize {

crates/corro-types/src/sqlite.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,12 @@ static CRSQL_EXT_DIR: Lazy<TempDir> = Lazy::new(|| {
183183

184184
pub fn rusqlite_to_crsqlite_write(conn: rusqlite::Connection) -> rusqlite::Result<CrConn> {
185185
let conn = rusqlite_to_crsqlite(conn)?;
186-
conn.execute_batch("PRAGMA cache_size = -32000;")?;
186+
conn.execute_batch("
187+
PRAGMA cache_size = -1048576; -- 1 GB (value in KiB, negative sign)
188+
PRAGMA temp_store = MEMORY;
189+
PRAGMA cache_spill = FALSE;
190+
"
191+
)?;
187192

188193
Ok(conn)
189194
}

0 commit comments

Comments
 (0)