-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
googleapis/gax-nodejs
#682Labels
needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Description
Environment details
- OS: Windows 10 Home
- Node.js version: 10.15.3
- npm version: 6.4.1
google-gaxversion: 0.25.6 (old version but I don't think this part has been changed)
Hello,
- It seems that the https://cloud.google.com/storage/docs/exponential-backoff retry strategy implementation isn't "exponential" but rather "random".
At the moment, for the setTimeout duration, I see in apiCallable.js :
const toSleep = delay * Math.random(); // [ 0 ; delay ]
instead of (maybe):
const toSleep = delay + Math.random() * 1000 // [ delay ; delay+E ]
- For the retries count case, instead of the "deadline" case, it seems that the timeout is undefined for the next iterations because of an invalid deadline Date:
timeout = Math.min(timeout * timeoutMult, maxTimeout, deadline - now.getTime());
Sorry if I'm wrong, thanks in advance !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs more infoThis issue needs more information from the customer to proceed.This issue needs more information from the customer to proceed.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.