From 1f310a473803031dfdbb29320e06c28efde0d258 Mon Sep 17 00:00:00 2001 From: Jussi Saurio Date: Thu, 9 Oct 2025 17:29:18 +0300 Subject: [PATCH] Remove expensive hot path assert --- core/vdbe/sorter.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/vdbe/sorter.rs b/core/vdbe/sorter.rs index a55cb656a..366d59e1e 100644 --- a/core/vdbe/sorter.rs +++ b/core/vdbe/sorter.rs @@ -296,14 +296,6 @@ impl Sorter { fn next_from_chunk_heap(&mut self) -> Result>> { // Make sure all chunks read at least one record into their buffer. - turso_assert!( - !self.chunks.iter().any(|chunk| matches!( - *chunk.io_state.read().unwrap(), - SortedChunkIOState::WaitingForRead - )), - "chunks should have been read" - ); - if let Some((next_record, next_chunk_idx)) = self.chunk_heap.pop() { // TODO: blocking will be unnecessary here with IO completions let io = self.io.clone();