mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-09 02:04:22 +01:00
wal_insert_end: call pager.rollback() after tx ends so that lock index is preserved when ending tx
This commit is contained in:
@@ -1170,12 +1170,13 @@ impl Connection {
|
||||
{
|
||||
let pager = self.pager.borrow();
|
||||
|
||||
{
|
||||
let wal = pager.wal.borrow_mut();
|
||||
wal.end_write_tx();
|
||||
wal.end_read_tx();
|
||||
}
|
||||
// remove all non-commited changes in case if WAL session left some suffix without commit frame
|
||||
pager.rollback(false, self)?;
|
||||
|
||||
let wal = pager.wal.borrow_mut();
|
||||
wal.end_write_tx();
|
||||
wal.end_read_tx();
|
||||
}
|
||||
|
||||
// let's re-parse schema from scratch if schema cookie changed compared to the our in-memory view of schema
|
||||
|
||||
Reference in New Issue
Block a user