Skip to content

Commit 4211db7

Browse files
committed
Introduce polling budget for operators that may loop
1 parent 2a7f64a commit 4211db7

File tree

18 files changed

+706
-46
lines changed

18 files changed

+706
-46
lines changed

datafusion/common/src/config.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,12 @@ config_namespace! {
413413
/// written, it may be necessary to increase this size to avoid errors from
414414
/// the remote end point.
415415
pub objectstore_writer_buffer_size: usize, default = 10 * 1024 * 1024
416+
417+
/// The maximum number of times pipeline breaking operators may poll
418+
/// their children in a loop before yielding. Setting this to a value
419+
/// greater than zero ensures running queries can be cancelled in a
420+
/// timely fashion.
421+
pub poll_budget: Option<u8>, default = Some(128)
416422
}
417423
}
418424

datafusion/core/tests/execution/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@
1616
// under the License.
1717

1818
mod logical_plan;
19+
mod yielding;

0 commit comments

Comments
 (0)