From 6d6f7fffff733282f66c84b853fb0bccdcddc2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teo=20Klestrup=20R=C3=B6ijezon?= Date: Wed, 8 Jun 2022 12:10:13 +0200 Subject: [PATCH] Revert #925 to prepare for a proper fix --- kube-runtime/src/controller/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kube-runtime/src/controller/mod.rs b/kube-runtime/src/controller/mod.rs index 181e20bd7..5be9bacda 100644 --- a/kube-runtime/src/controller/mod.rs +++ b/kube-runtime/src/controller/mod.rs @@ -202,6 +202,8 @@ impl Display for ReconcileReason { } } +const APPLIER_REQUEUE_BUF_SIZE: usize = 100; + /// Apply a reconciler to an input stream, with a given retry policy /// /// Takes a `store` parameter for the core objects, which should usually be updated by a [`reflector`]. @@ -231,7 +233,8 @@ where { let (scheduler_shutdown_tx, scheduler_shutdown_rx) = channel::oneshot::channel(); let err_context = context.clone(); - let (scheduler_tx, scheduler_rx) = channel::mpsc::unbounded::>>(); + let (scheduler_tx, scheduler_rx) = + channel::mpsc::channel::>>(APPLIER_REQUEUE_BUF_SIZE); // Create a stream of ObjectRefs that need to be reconciled trystream_try_via( // input: stream combining scheduled tasks and user specified inputs event