Skip to content

fix: Logging headers when retrying request - #1164

Merged
antusus merged 2 commits into
mainfrom
kb/logging_headers
May 4, 2023
Merged

antusus merged 2 commits into
mainfrom
kb/logging_headers

Conversation

@antusus

@antusus antusus commented Apr 28, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Apr 28, 2023

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build #2899

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 71.257%

Totals Coverage Status
Change from base Build #2884: 0.06%
Covered Lines: 7115
Relevant Lines: 9985

💛 - Coveralls

@antusus antusus changed the title chore: Logging headers when retrying request fix: Logging headers when retrying request Apr 28, 2023
//1.0 + 0.5
double jitter = (Math.random() * (maxWindow - minWindow)) + minWindow;

//2^5*1000*1,5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not necessarily 2^5 (5 changes) so this comment may be misleading. Add max 2^5*1000*1,5 or sth like that

int exponent = this.maxAttempts - this.attemptsRemaining;
double minWindow = 1 - RANDOM_FACTOR;
double maxWindow = 1 + RANDOM_FACTOR;
//1.0 + 0.5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not getting fully this comment either

}

/**
* Waits for some random amount of time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not completely random. Maybe specify that waits for amount of time calculated by exponential backoff?

@antusus
antusus merged commit e0c3d8e into main May 4, 2023
@antusus
antusus deleted the kb/logging_headers branch May 4, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants