Skip to content

Commit 8b03e5e

Browse files
pepijnvealamb
andauthored
Use Tokio's task budget consistently, better APIs to support task cancellation (#16398)
* Use Tokio's task budget consistently * Rework `ensure_coop` to base itself on evaluation and scheduling properties * Iterating on documentation * Improve robustness of cooperative yielding test cases * Reorganize tests by operator a bit better * Coop documentation * More coop documentation * Avoid Box in temporary CooperativeStream::poll_next implementation * Adapt interleave test cases for range generator * Add temporary `tokio_coop` feature to unblock merging * Extract magic number to constant * Fix documentation error * Push scheduling type down from DataSourceExec to DataSource * Use custom configuration instead of feature to avoid exposing internal cooperation variants * Use dedicated enum for yield results * Documentation improvements from review * More documentation * Change default coop strategy to 'tokio_fallback' * Documentation refinement * Re-enable interleave test cases * fix logical merge conflict --------- Co-authored-by: Andrew Lamb <[email protected]>
1 parent 7914624 commit 8b03e5e

File tree

35 files changed

+1580
-1528
lines changed

35 files changed

+1580
-1528
lines changed

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,5 +218,9 @@ unnecessary_lazy_evaluations = "warn"
218218
uninlined_format_args = "warn"
219219

220220
[workspace.lints.rust]
221-
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(tarpaulin)", "cfg(tarpaulin_include)"] }
221+
unexpected_cfgs = { level = "warn", check-cfg = [
222+
'cfg(datafusion_coop, values("tokio", "tokio_fallback", "per_stream"))',
223+
"cfg(tarpaulin)",
224+
"cfg(tarpaulin_include)",
225+
] }
222226
unused_qualifications = "deny"

datafusion/common/src/config.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -796,15 +796,6 @@ config_namespace! {
796796
/// then the output will be coerced to a non-view.
797797
/// Coerces `Utf8View` to `LargeUtf8`, and `BinaryView` to `LargeBinary`.
798798
pub expand_views_at_output: bool, default = false
799-
800-
/// When DataFusion detects that a plan might not be promply cancellable
801-
/// due to the presence of tight-looping operators, it will attempt to
802-
/// mitigate this by inserting explicit yielding (in as few places as
803-
/// possible to avoid performance degradation). This value represents the
804-
/// yielding period (in batches) at such explicit yielding points. The
805-
/// default value is 64. If set to 0, no DataFusion will not perform
806-
/// any explicit yielding.
807-
pub yield_period: usize, default = 64
808799
}
809800
}
810801

0 commit comments

Comments
 (0)