From 5c0cb8e69586d8a2cbf9fa193a94a8b88000130f Mon Sep 17 00:00:00 2001 From: WenyXu Date: Wed, 16 Sep 2026 09:09:08 +0000 Subject: [PATCH] fix: introduce batch flush error with its table batcher consumer Signed-off-by: WenyXu --- src/operator/src/error.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/operator/src/error.rs b/src/operator/src/error.rs index 8caf829e1e7..c6b84543c47 100644 --- a/src/operator/src/error.rs +++ b/src/operator/src/error.rs @@ -13,6 +13,7 @@ // limitations under the License. use std::any::Any; +use std::sync::Arc; use common_datasource::file_format::Format; use common_error::define_into_tonic_status; @@ -101,6 +102,13 @@ pub enum Error { location: Location, }, + #[snafu(display("Failed to flush pending batch: {source}"))] + BatchFlush { + source: Arc, + #[snafu(implicit)] + location: Location, + }, + #[snafu(display("external error"))] External { #[snafu(implicit)] @@ -1051,6 +1059,7 @@ impl ErrorExt for Error { | Error::DescribeStatement { source, .. } => source.status_code(), Error::AlterExprToRequest { source, .. } => source.status_code(), Error::External { source, .. } => source.status_code(), + Error::BatchFlush { source, .. } => source.status_code(), Error::FindTablePartitionRule { source, .. } | Error::SplitInsert { source, .. } | Error::SplitDelete { source, .. } @@ -1156,6 +1165,7 @@ impl ErrorExt for Error { Error::Catalog { source, .. } => source.retry_hint(), Error::SubstraitCodec { source, .. } => source.retry_hint(), Error::External { source, .. } => source.retry_hint(), + Error::BatchFlush { source, .. } => source.retry_hint(), Error::BuildRecordBatch { source, .. } => source.retry_hint(), Error::DecodeFlightData { source, .. } => source.retry_hint(), Error::SqlCommon { source, .. } => source.retry_hint(),