Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup exponential backoff with jitter #2443

Merged
merged 8 commits into from
Apr 18, 2023

Conversation

chilagrow
Copy link
Member

@chilagrow chilagrow commented Apr 17, 2023

Description

Closes #1720.

Readiness checklist

  • I added/updated unit tests.
  • I added/updated integration/compatibility tests.
  • I added/updated comments and checked rendering.
  • I made spot refactorings.
  • I updated user documentation.
  • I ran task all, and it passed.
  • I ensured that PR title is good enough for the changelog.
  • (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • I marked all done items in this checklist.

@codecov
Copy link

codecov bot commented Apr 17, 2023

Codecov Report

Merging #2443 (1ed5535) into main (548114f) will decrease coverage by 37.66%.
The diff coverage is 50.00%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2443       +/-   ##
===========================================
- Coverage   64.42%   26.76%   -37.66%     
===========================================
  Files         394      394               
  Lines       19349    19339       -10     
===========================================
- Hits        12465     5177     -7288     
- Misses       5982    13606     +7624     
+ Partials      902      556      -346     
Impacted Files Coverage Δ
internal/handlers/tigris/tigrisdb/databases.go 54.90% <25.00%> (+1.19%) ⬆️
internal/clientconn/listener.go 54.35% <33.33%> (-18.47%) ⬇️
internal/util/ctxutil/ctxutil.go 34.28% <50.00%> (-43.50%) ⬇️
internal/handlers/pg/pgdb/transactions.go 67.60% <71.42%> (-5.13%) ⬇️

... and 124 files with indirect coverage changes

Flag Coverage Δ
integration 4.70% <0.00%> (-52.78%) ⬇️
mongodb 4.70% <0.00%> (+<0.01%) ⬆️
pg ?
unit 25.42% <50.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@chilagrow chilagrow changed the title Minor cleanup Minor cleanup of exponential backoff with jitter Apr 17, 2023
@chilagrow chilagrow added the code/chore Code maintenance improvements label Apr 17, 2023
@chilagrow chilagrow marked this pull request as ready for review April 17, 2023 09:55
@chilagrow chilagrow requested a review from a team as a code owner April 17, 2023 09:55
@chilagrow chilagrow requested review from AlekSi, w84thesun, a team, rumyantseva and noisersup April 17, 2023 09:55
@chilagrow chilagrow enabled auto-merge (squash) April 17, 2023 09:55
@chilagrow
Copy link
Member Author

@j0holo I've added minor updates to your initial work 🤗

@j0holo
Copy link
Contributor

j0holo commented Apr 17, 2023

@chilagrow Yeah, looks indeed like an nice improvement. Always nice to see different implementation of similar code.

@AlekSi AlekSi added this to the v1.1.0 milestone Apr 17, 2023
AlekSi
AlekSi previously approved these changes Apr 17, 2023
internal/handlers/pg/pgdb/transactions.go Outdated Show resolved Hide resolved
rumyantseva
rumyantseva previously approved these changes Apr 17, 2023
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

Great job!

As Alexey noticed, we need to check that the issue number 1720 is not mentioned in the code TODOs anymore. But the code itself looks reasonable and readable to me.

noisersup
noisersup previously approved these changes Apr 17, 2023
@chilagrow chilagrow dismissed stale reviews from noisersup, rumyantseva, and AlekSi via d707761 April 18, 2023 02:59
@chilagrow chilagrow requested a review from noisersup April 18, 2023 02:59
@chilagrow chilagrow requested review from AlekSi and rumyantseva April 18, 2023 02:59
Copy link
Contributor

@rumyantseva rumyantseva left a comment

Choose a reason for hiding this comment

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

LGTM

@chilagrow chilagrow merged commit ec496f0 into FerretDB:main Apr 18, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
fenogentov pushed a commit to fenogentov/FerretDB that referenced this pull request Apr 20, 2023
@AlekSi AlekSi changed the title Minor cleanup of exponential backoff with jitter Cleanup exponential backoff with jitter May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Use exponential backoff with jitter
5 participants