mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-14 04:24:20 +01:00
pager: call rollback() after ending txn so that read lock info is not lost when ending txn
This commit is contained in:
@@ -818,11 +818,11 @@ impl Pager {
|
||||
) -> Result<IOResult<PagerCommitResult>> {
|
||||
tracing::trace!("end_tx(rollback={})", rollback);
|
||||
if rollback {
|
||||
self.rollback(schema_did_change, connection)?;
|
||||
if matches!(connection.transaction_state.get(), TransactionState::Write { .. }) {
|
||||
self.wal.borrow().end_write_tx();
|
||||
}
|
||||
self.wal.borrow().end_read_tx();
|
||||
self.rollback(schema_did_change, connection)?;
|
||||
return Ok(IOResult::Done(PagerCommitResult::Rollback));
|
||||
}
|
||||
let commit_status = self.commit_dirty_pages(wal_checkpoint_disabled)?;
|
||||
|
||||
Reference in New Issue
Block a user