From 7dbfdba59f3c314ea04b221c7270630a511d3bee Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Tue, 4 Feb 2025 13:23:53 +0200 Subject: [PATCH] core: Fix benchmark panic if syscall is interrupted Fixes the following panics: Benchmarking Execute `SELECT * FROM users LIMIT ?`/Limbo/100: Profiling for 5.0000 sthread 'main' panicked at core/benches/benchmark.rs:69:43: called `Result::unwrap()` on an `Err` value: IOError(Os { code: 4, kind: Interrupted, message: "Interrupted system call" }) note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace --- core/benches/benchmark.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/benches/benchmark.rs b/core/benches/benchmark.rs index 8441c8081..215a8f5f6 100644 --- a/core/benches/benchmark.rs +++ b/core/benches/benchmark.rs @@ -66,7 +66,7 @@ fn bench(criterion: &mut Criterion) { black_box(row); } limbo_core::StepResult::IO => { - io.run_once().unwrap(); + let _ = io.run_once(); } limbo_core::StepResult::Done => { break; @@ -113,7 +113,7 @@ fn bench(criterion: &mut Criterion) { black_box(row); } limbo_core::StepResult::IO => { - io.run_once().unwrap(); + let _ = io.run_once(); } limbo_core::StepResult::Done => { break;