mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-12 03:34:20 +01:00
Merge 'sim: return LimboError::Busy when busy, instead of looping forever' from Jussi Saurio
Although concurrency doesn't work yet (#2059), we do want to support concurrency, and one good first step is not to make the simulator hang forever once any connection gets a `Busy` result from the VDBE Closes #2060 Reviewed-by: Pere Diaz Bou <pere-altea@homail.com> Closes #2061
This commit is contained in:
@@ -446,7 +446,9 @@ impl Interaction {
|
||||
StepResult::Done => {
|
||||
break;
|
||||
}
|
||||
StepResult::Busy => {}
|
||||
StepResult::Busy => {
|
||||
return Err(turso_core::LimboError::Busy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +581,10 @@ impl Interaction {
|
||||
StepResult::Done => {
|
||||
break;
|
||||
}
|
||||
StepResult::Interrupt | StepResult::Busy => {}
|
||||
StepResult::Busy => {
|
||||
return Err(turso_core::LimboError::Busy);
|
||||
}
|
||||
StepResult::Interrupt => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +651,10 @@ impl Interaction {
|
||||
StepResult::Done => {
|
||||
break;
|
||||
}
|
||||
StepResult::Interrupt | StepResult::Busy => {}
|
||||
StepResult::Busy => {
|
||||
return Err(turso_core::LimboError::Busy);
|
||||
}
|
||||
StepResult::Interrupt => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,7 +268,9 @@ fn limbo_integrity_check(conn: &Arc<Connection>) -> Result<()> {
|
||||
StepResult::Done => {
|
||||
break;
|
||||
}
|
||||
StepResult::Busy => {}
|
||||
StepResult::Busy => {
|
||||
return Err(LimboError::Busy);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user