Repository navigation
[2.4.x] Merge test_h2_008_04 server-status race fix from trunk - #720
Merged
Merged
Conversation
Member
|
Thanks @notroj . The polling fixes the access count, but the retry path then fails the kBytes check: each extra I reproduced the race locally on 2.4.x by delaying
The change I tested: polled_kb = 0
for _ in range(10):
stats = self.get_server_status(env)
accesses = int(stats['Total Accesses'])
if accesses >= expected:
break
expected += 1
polled_kb += (stats['_bytes'] + 1023) // 1024 + 1
time.sleep(0.1)
...
# Upper bound
assert (4*(count+1))+1 + polled_kb > int(stats['Total kBytes']), f'{stats}'With This also passed with 0–9 forced extra polls locally. The additional 1 kB is an allowance for headers rather than an exact measurement, so there may be a better way to account for the polling traffic. Trunk has the same test, so it may be worth fixing there first. |
Poll server-status until the access count settles, allowing for the polls themselves in the expected totals. (TestRanges.get_server_status): Record the response body length. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> (cherry picked from commit 15c6e22)
notroj
force-pushed
the
24x-h2-ranges-settle
branch
from
November 28, 2026 11:51
b47405d to
9453189
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #1109 (15c6e22), replacing the earlier version of this fix. As well as polling
/status?autountilTotal Accessessettles, theTotal kBytesupper bound now allows for the body size of every extra status response, the problem @arturobernalg found here.🤖 Generated with Claude Code