We were double counting the circuit breaker by calling
circuit.onRequest() but then noting that we could
not handleLazily and returning early.
This broke the circuit breaker, we also potentially double
count rate limiter.
In fact we do EVERYTHING again for the eager path; I think
this entire code path from "try lazy; oops eager" is going
to be brutally expensive for ad() and relay-ad()
We may have to port ad() and relay-ad() to be fully
lazy endpoints for performance reasons.
We were double counting the circuit breaker by calling
circuit.onRequest()
but then noting that we could not handleLazily and returning early.This broke the circuit breaker, we also potentially double count rate limiter.
In fact we do EVERYTHING again for the eager path; I think this entire code path from "try lazy; oops eager" is going to be brutally expensive for
ad()
andrelay-ad()
We may have to port
ad()
andrelay-ad()
to be fully lazy endpoints for performance reasons.r: @rf @kriskowal @jcorbin