From e2df4e1d33748b5bf943783596e35a913e66fd5d Mon Sep 17 00:00:00 2001 From: Pere Diaz Bou Date: Tue, 24 Jun 2025 10:55:51 +0200 Subject: [PATCH] run cacheflush until completion cli --- cli/app.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/app.rs b/cli/app.rs index b2e6ba388..18b73a7e7 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -11,7 +11,7 @@ use crate::{ HISTORY_FILE, }; use comfy_table::{Attribute, Cell, CellAlignment, ContentArrangement, Row, Table}; -use limbo_core::{Database, LimboError, Statement, StepResult, Value}; +use limbo_core::{Database, LimboError, PagerCacheflushStatus, Statement, StepResult, Value}; use tracing_appender::non_blocking::WorkerGuard; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter}; @@ -841,7 +841,9 @@ impl Limbo { } } // for now let's cache flush always - self.conn.cacheflush()?; + while let PagerCacheflushStatus::IO = self.conn.cacheflush()? { + self.io.run_once()?; + } Ok(()) }