mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-18 14:35:14 +01:00
read from database file only if max_frame_read_lock_index is 0 and max_frame > min_frame
- transaction which was started with max_frame = 0 and max_frame_read_lock_index = 0 can write to the WAL and in this case it needs to read data back from WAL - without cache spilling its hard to reproduce this issue for the turso-db now, but I stumbled into this issue with sync-engine which do weird stuff with the WAL which "simulates" cache spilling behaviour to some extent
This commit is contained in:
@@ -284,6 +284,7 @@ fn test_wal_checkpoint() -> anyhow::Result<()> {
|
||||
let conn = tmp_db.connect_limbo();
|
||||
|
||||
for i in 0..iterations {
|
||||
log::info!("iteration #{}", i);
|
||||
let insert_query = format!("INSERT INTO test VALUES ({i})");
|
||||
do_flush(&conn, &tmp_db)?;
|
||||
conn.checkpoint(CheckpointMode::Passive {
|
||||
@@ -823,7 +824,7 @@ pub fn run_query_core(
|
||||
on_row(row)
|
||||
}
|
||||
}
|
||||
_ => unreachable!(),
|
||||
r => panic!("unexpected step result: {r:?}"),
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user