wal_insert_end: call pager.rollback() after tx ends so that lock index is preserved when ending tx

This commit is contained in:
Jussi Saurio
2025-07-30 18:22:40 +03:00
parent 7240d7903c
commit ff1c1b6b8c

View File

@@ -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