Skip to content

Lowering ack callback to avoid race condition #6012

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
merged 3 commits into from
Apr 14, 2025

Conversation

RanVaknin
Copy link
Contributor

Motivation and Context

This PR addresses an intermittent test failure in Http2PingHandlerTest.delayedPingFlushDoesntTerminateConnectionPrematurely(). The test was occasionally failing with a PingFailedException due to timing issues between ping scheduling, and delayed writes. The test verifies that a delayed ping flush doesn't prematurely terminate the connection, but the race condition in the test setup was causing inconsistent results.

Testing

Even though this test failed intermittently in our CI builds, I ran the test locally with @RepeatedTest(1000) before making changes and observed a 100% success rate locally.
While this wont deterministically solve the issue, the change aims to make these failures even more rare by reducing the response time window.

@RanVaknin RanVaknin requested a review from a team as a code owner April 7, 2025 21:38
Copy link
Contributor

@davidh44 davidh44 left a comment

Choose a reason for hiding this comment

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

@RanVaknin
Copy link
Contributor Author

RanVaknin commented Apr 10, 2025

I re-scanned our logs and in the last 10 we saw 9 total failures for Http2PingHandlerTest, all failures only occurred in delayedPingFlushDoesntTerminateConnectionPrematurely. I decided to add a retryable annotation because Iam less confident now in lowering the callback.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@RanVaknin RanVaknin added this pull request to the merge queue Apr 14, 2025
Merged via the queue into master with commit 877bff8 Apr 14, 2025
18 of 19 checks passed
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