Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions crates/adapterlib/src/errors/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,14 @@ pub enum ConfigError {
FtRequiresStorage,
FtRequiresFtInput,

/// `datafusion_memory_mb` was set to a value greater than or equal to
/// the pipeline's effective memory budget, which would leave no memory
/// for the DBSP circuit.
DatafusionMemoryExceedsBudget {
datafusion_memory_mb: u64,
max_rss_mb: u64,
},

InvalidLayout(LayoutError),
}

Expand Down Expand Up @@ -203,6 +211,9 @@ impl DbspDetailedError for ConfigError {
Self::FtRequiresFtInput => Cow::from("FtWithNonFtInput"),
Self::CyclicDependency { .. } => Cow::from("CyclicDependency"),
Self::EmptyStartAfter { .. } => Cow::from("EmptyStartAfter"),
Self::DatafusionMemoryExceedsBudget { .. } => {
Cow::from("DatafusionMemoryExceedsBudget")
}
Self::InvalidLayout(_) => Cow::from("LayoutError"),
}
}
Expand Down Expand Up @@ -417,6 +428,13 @@ impl Display for ConfigError {
f,
"Fault tolerance is configured, but it cannot be enabled because the pipeline has at least one non-fault-tolerant input adapter"
),
Self::DatafusionMemoryExceedsBudget {
datafusion_memory_mb,
max_rss_mb,
} => write!(
f,
"'datafusion_memory_mb' ({datafusion_memory_mb} MB) must be less than the pipeline's memory budget ({max_rss_mb} MB); the difference is the budget available to the DBSP circuit"
),
Self::InvalidLayout(e) => write!(f, "Multihost layout error: {e}"),
}
}
Expand Down
Loading
Loading