You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSHARP-6089: Use attempt number as backoff exponent per updated spec
Update the exponential-backoff formula from 2^(attempt-1) to 2^attempt
per the client-backpressure and transactions-convenient-api spec change
(mongodb/specifications#1953), and update the dependent backoff tests.
Also adds the baseBackoffMS overload integration test.
// Exponential backoff run: overload error without baseBackoffMS -> 100ms + 200ms = 300ms with jitter = 1.
191
+
// Exponential backoff run: overload error without baseBackoffMS -> 200ms + 400ms = 600ms with jitter = 1.
192
192
var exponentialException = CoreExceptionHelper.CreateMongoCommandExceptionWithLabels(462,"SystemOverloadedError","RetryableError");
193
193
var exponentialMs =awaitMeasureBackoff(async,executeSync,executeAsync,operationContext,createOperation(exponentialException),createContext(fullJitterRandom.Object));
194
194
195
-
// baseBackoffMS override run: overload error with baseBackoffMS = 50 -> 50ms + 100ms = 150ms with jitter = 1.
195
+
// baseBackoffMS override run: overload error with baseBackoffMS = 50 -> 100ms + 200ms = 300ms with jitter = 1.
196
196
var overrideResult = BsonDocument.Parse("{ ok : 0, code : 462, baseBackoffMS : 50 }");
var withBaseBackoffMs =awaitMeasureBackoff(async,executeSync,executeAsync,operationContext,createOperation(overrideException),createContext(fullJitterRandom.Object));
199
199
200
-
// Per the spec: assertTrue(abs(exponential_backoff_time - (with_retry_after_ms_time + 0.2s)) < 0.2s)
0 commit comments