Skip to content

Commit fd3d397

Browse files
authored
Don't scale down on errors w/ poller autoscale unlesss seen a decision (#945)
1 parent 92bf871 commit fd3d397

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/pollers/poll_buffer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,9 @@ impl PollScalerReportHandle {
539539
}
540540
Err(e) => {
541541
// We should only see (and react to) errors in autoscaling mode
542-
if matches!(self.behavior, PollerBehavior::Autoscaling { .. }) {
542+
if matches!(self.behavior, PollerBehavior::Autoscaling { .. })
543+
&& self.ever_saw_scaling_decision.load(Ordering::Relaxed)
544+
{
543545
debug!("Got error from server while polling: {:?}", e);
544546
if e.code() == Code::ResourceExhausted {
545547
// Scale down significantly for resource exhaustion

0 commit comments

Comments
 (0)