diff --git a/core/incremental/expr_compiler.rs b/core/incremental/expr_compiler.rs index f94d72a2a..188543111 100644 --- a/core/incremental/expr_compiler.rs +++ b/core/incremental/expr_compiler.rs @@ -435,11 +435,6 @@ impl CompiledExpression { "Expression evaluation was interrupted".to_string(), )); } - crate::vdbe::execute::InsnFunctionStepResult::Busy => { - return Err(crate::LimboError::InternalError( - "Expression evaluation encountered busy state".to_string(), - )); - } crate::vdbe::execute::InsnFunctionStepResult::Step => { pc = state.pc as usize; } diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index 53fc247df..8bcc9b311 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -159,7 +159,6 @@ pub enum InsnFunctionStepResult { IO(IOCompletions), Row, Interrupt, - Busy, Step, } @@ -2205,11 +2204,7 @@ pub fn op_transaction( !conn.is_nested_stmt.get(), "nested stmt should not begin a new read transaction" ); - let res = pager.begin_read_tx(); - if let Err(LimboError::Busy) = res { - return Ok(InsnFunctionStepResult::Busy); - } - res?; + let res = pager.begin_read_tx()?; } if updated && matches!(new_transaction_state, TransactionState::Write { .. }) { @@ -2227,7 +2222,7 @@ pub fn op_transaction( conn.transaction_state.replace(TransactionState::None); } assert_eq!(conn.transaction_state.get(), current_state); - return Ok(InsnFunctionStepResult::Busy); + return Err(LimboError::Busy); } if let IOResult::IO(io) = begin_w_tx_res? { // set the transaction state to pending so we don't have to diff --git a/core/vdbe/mod.rs b/core/vdbe/mod.rs index 0606f2e08..5584546cb 100644 --- a/core/vdbe/mod.rs +++ b/core/vdbe/mod.rs @@ -675,7 +675,7 @@ impl Program { // Instruction interrupted - may resume at same PC return Ok(StepResult::Interrupt); } - Ok(InsnFunctionStepResult::Busy) => { + Err(LimboError::Busy) => { // Instruction blocked - will retry at same PC return Ok(StepResult::Busy); }