From 90b410bef4dd423d107795f7e9f134c9cabc013a Mon Sep 17 00:00:00 2001 From: LiuJoyceC Date: Mon, 29 Aug 2016 17:18:57 -0700 Subject: [PATCH] Reverts documentation back to saying 100ms as base retry delay. Updates retry delay util function to use default 100ms base retry delay. --- lib/config.js | 2 +- lib/credentials/ec2_metadata_credentials.js | 2 +- lib/credentials/ecs_credentials.js | 2 +- lib/util.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config.js b/lib/config.js index 8b643521c1..856b5adf79 100644 --- a/lib/config.js +++ b/lib/config.js @@ -100,7 +100,7 @@ require('./credentials/credential_provider_chain'); * Currently supported options are: * * * **base** [Integer] — The base number of milliseconds to use in the - * exponential backoff for operation retries. Defaults to 30 ms. + * exponential backoff for operation retries. Defaults to 100 ms. * * **customBackoff ** [function] — A custom function that accepts a retry count * and returns the amount of time to delay in milliseconds. The `base` option will be * ignored if this option is supplied. diff --git a/lib/credentials/ec2_metadata_credentials.js b/lib/credentials/ec2_metadata_credentials.js index 8ca8060f2b..42e1f7ea96 100644 --- a/lib/credentials/ec2_metadata_credentials.js +++ b/lib/credentials/ec2_metadata_credentials.js @@ -18,7 +18,7 @@ require('../metadata_service'); * AWS.config.credentials = new AWS.EC2MetadataCredentials({ * httpOptions: { timeout: 5000 }, // 5 second timeout * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 30 } // see AWS.Config for information + * retryDelayOptions: { base: 200 } // see AWS.Config for information * }); * ``` * diff --git a/lib/credentials/ecs_credentials.js b/lib/credentials/ecs_credentials.js index d557182930..64b0064e02 100644 --- a/lib/credentials/ecs_credentials.js +++ b/lib/credentials/ecs_credentials.js @@ -17,7 +17,7 @@ var AWS = require('../core'); * AWS.config.credentials = new AWS.ECSCredentials({ * httpOptions: { timeout: 5000 }, // 5 second timeout * maxRetries: 10, // retry 10 times - * retryDelayOptions: { base: 30 } // see AWS.Config for information + * retryDelayOptions: { base: 200 } // see AWS.Config for information * }); * ``` * diff --git a/lib/util.js b/lib/util.js index 823ebfbaec..171c85a417 100644 --- a/lib/util.js +++ b/lib/util.js @@ -804,7 +804,7 @@ var util = { if (typeof customBackoff === 'function') { return customBackoff(retryCount); } - var base = retryDelayOptions.base || 30; + var base = retryDelayOptions.base || 100; var delay = Math.random() * (Math.pow(2, retryCount) * base); return delay; },