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:
Pere Diaz Bou
2025-06-18 17:00:37 +02:00
parent 10d02525d6
commit 65372994d4

View File

@@ -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);
}