Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

fix: create new retryer configuration for each service #14

Merged
merged 2 commits into from
Mar 14, 2021

Conversation

James-Quigley
Copy link
Contributor

fixes issue described in sdk docs where a global retry token bucket was being shared across all services https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/retries-timeouts/#customizing-behavior

This meant that if a single service hit a backoff, then every services subsequent requests would be heavily delayed, making ingestion slow.

fixes issue described in sdk docs where a global retry token bucket was being shared across all services https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/retries-timeouts/#customizing-behavior
Copy link
Member

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! one minor comment.

@@ -236,7 +243,9 @@ func (p *Provider) fetchAccount(accountID string, awsCfg aws.Config, svc *sts.Cl

innerLog := p.Logger.With("account_id", accountID, "region", region)
for serviceName, newFunc := range regionalServices {
resourceClients[serviceName] = newFunc(awsCfg,
cfg := awsCfg.Copy()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that there is no need for this line as it is already copied when awsCfg pass to this function (as it's not a pointer).

@yevgenypats yevgenypats merged commit f633eff into cloudquery:main Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants