-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-141498: Change backoff counter to use prime numbers instead of powers of 2 #141591
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
Merged
markshannon
merged 21 commits into
python:main
from
efimov-mikhail:issue-141498-backoff-counter-2
Nov 21, 2025
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
86de63a
Some refactor
efimov-mikhail 4eb3231
Changes in backoff bit pattern
efimov-mikhail 2581629
Add NEWS
efimov-mikhail 96de415
NEWS fix
efimov-mikhail ce3e14f
Change ITEMS count in test
efimov-mikhail e17b195
Refactor restart_backoff_counter
efimov-mikhail 44b4eb8
Remove unneed assertion and function
efimov-mikhail 6d44333
Use lookup_table
efimov-mikhail 0e05712
Use MAKE_BACKOFF_COUNTER macro
efimov-mikhail f3c9287
Comment change
efimov-mikhail e16b368
Fix Windows build: remove const keyword
efimov-mikhail 6b1fe66
Simplify obtaining next backoff
efimov-mikhail 2600236
Remove forge_backoff_counter
efimov-mikhail ec27072
Another try to fix Windows build
efimov-mikhail 401b6da
Revert make_backoff_counter
efimov-mikhail 3418be1
Revert changes to pycore_code.h
efimov-mikhail ceddb6a
Comment fix
efimov-mikhail a89d6de
Temporarily disable assert
efimov-mikhail c7873c2
Revert forge_backoff_counter
efimov-mikhail 5b7bfd9
Fix CI, NEWS updated
efimov-mikhail dda4cdb
Review addressed: change values and comment
efimov-mikhail File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Core_and_Builtins/2025-11-15-14-04-35.gh-issue-141589.VfdMDD.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Change ``backoff counter`` to use prime numbers instead of powers of 2. | ||
| Use only 3 bits for ``counter`` and 13 bits for ``value``. | ||
| This allows to support values up to 8191. Patch by Mikhail Efimov. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.