History

zeta: Smaller reject batches (#43942)

We were allowing the client to build up to `MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST`. We'll now attempt to flush the rejections when we reach half max. Release Notes: - N/A

Agus Zubiaga committed 11 months ago

Commit efff6021 parent 58c9cba1 file · +1 −1Browse files

Unified · Split

crates/zeta/src/zeta.rs+1−1
@@ -993,7 +993,7 @@ impl Zeta { · 992 unmodified lines
993 });993 });
994 994
995 let reached_request_limit =995 let reached_request_limit =
996 self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST;996 self.rejected_predictions.len() >= MAX_EDIT_PREDICTION_REJECTIONS_PER_REQUEST / 2;
997 let reject_tx = self.reject_predictions_tx.clone();997 let reject_tx = self.reject_predictions_tx.clone();
998 self.reject_predictions_debounce_task = Some(cx.spawn(async move |_this, cx| {998 self.reject_predictions_debounce_task = Some(cx.spawn(async move |_this, cx| {
999 const REJECT_REQUEST_DEBOUNCE: Duration = Duration::from_secs(15);999 const REJECT_REQUEST_DEBOUNCE: Duration = Duration::from_secs(15);