mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-08 17:54:22 +01:00
op_transaction end_read_tx in case of begin_write_tx is busy
In case of starting a write txn, we always start by starting a read txn. If we don't end_read_tx then it will never release locks.
This commit is contained in:
@@ -1709,6 +1709,7 @@ pub fn op_transaction(
|
||||
|
||||
if updated && matches!(new_transaction_state, TransactionState::Write) {
|
||||
if let LimboResult::Busy = pager.begin_write_tx()? {
|
||||
pager.end_read_tx()?;
|
||||
tracing::trace!("begin_write_tx busy");
|
||||
return Ok(InsnFunctionStepResult::Busy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user