Kaynağa Gözat

docs: the provider episode was a 20-second degradation, not a sub-second outage

The Retry-After constant's reasoning said the three failures were 13
seconds apart, so the outage was sub-second. The 13 seconds was the gap
between two timestamps I had observed and never an outage duration - and
a consumer read it straight back to me as a 13-second blip their 3.5 s
retry budget would absorb, which it would not have.

Measured instead, in the 31 seconds around two of the failures: 50 x 201
and 2 x 422, with a refusal in the SAME SECOND as a success on the same
collection. The provider was serving other requests while refusing
these. The episode was about twenty seconds and shows up as latency -
10.8, 9.1, 6.1 and 8.3 s against a 0.40 s baseline - so it is a
degradation rather than an outage.

The value stays 2 and now says why it survived the larger number:
concurrent requests succeeded throughout, so the instruction is try
again shortly rather than wait. Had it genuinely been a 13-second
outage, the consumer's decision to add no retry would have been wrong,
which is why the correction was worth sending rather than noting.
fszontagh 3 hafta önce
ebeveyn
işleme
3c359584c7
1 değiştirilmiş dosya ile 19 ekleme ve 5 silme
  1. 19 5
      src/errors.hpp

+ 19 - 5
src/errors.hpp

@@ -65,11 +65,25 @@ constexpr int kRetryAfterRateLimitedSec = 60;    ///< the limiter's own window
 /// naming them here: two files quoting "5" would drift the first time one moved.
 constexpr int kRetryAfterRunnerUnreachableSec = 5;  ///< a runner is configured and did not answer
 /// A provider that answered 429 or 5xx, i.e. one having a bad moment rather than
-/// refusing our request. Deliberately the SHORTEST value here: measured on prod
-/// 2026-11-05, three writes of 26,186 failed this way 13 seconds apart and an
-/// immediate retry of all three with byte-identical text succeeded first time,
-/// so the outage was sub-second. The asymmetry noted above applies with full
-/// force - too long converts a blip into a stalled write.
+/// refusing our request. Deliberately the SHORTEST value here, and the reason is
+/// a measurement rather than a preference.
+///
+/// Measured on prod 2026-11-05, in the 31 seconds around two of the three
+/// failures: 50 requests answered 201 and 2 answered 422, with a refusal landing
+/// in the SAME SECOND as a success on the same collection. So the provider was
+/// serving other requests while refusing these - there was no outage to wait
+/// out, and an immediate retry would have been competing with calls that were
+/// already succeeding. (An earlier version of this comment said the three
+/// failures were "13 seconds apart, so the outage was sub-second". The 13
+/// seconds was the gap between two observed timestamps and never an outage
+/// duration; the replacement above is what the log actually shows.)
+///
+/// The episode WAS about twenty seconds long and visible as latency - 10.8 s,
+/// 9.1 s, 6.1 s and 8.3 s against a 0.40 s baseline - which argues for a longer
+/// value. It is still 2, because concurrent requests succeeded throughout, so
+/// the honest instruction is "try again shortly" and not "wait out an outage",
+/// and the asymmetry noted above applies with full force: a caller honouring an
+/// inflated number converts a blip into a stalled write.
 constexpr int kRetryAfterEmbeddingProviderSec = 2;