ackhandler: only generate RTT sample for the last ack-eliciting packet#5493
ackhandler: only generate RTT sample for the last ack-eliciting packet#5493marten-seemann merged 1 commit intomasterfrom
Conversation
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
51a4888 to
5da5779
Compare
There was a problem hiding this comment.
Pull request overview
This PR modifies the RTT sample generation logic in the ack handler to only generate RTT samples for the last ack-eliciting packet sent across all packet number spaces, addressing issue #5474.
Key Changes:
- Added tracking of the send time of the last acknowledged ack-eliciting packet across packet number spaces
- Modified RTT update logic to only generate samples when the acknowledged packet was sent at or after the previously acknowledged packet
- Refactored test helper function
contains0RTTPacketto the more generalcontainsPacketTypefor reuse
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/ackhandler/sent_packet_handler.go | Added largestAckedTime field to track chronologically last acknowledged packet; updated RTT calculation logic to only update when current packet's send time is >= last acked time |
| internal/ackhandler/sent_packet_handler_test.go | Renamed existing RTT test for clarity; added new test to verify RTT behavior across packet number spaces (Initial and Handshake) |
| integrationtests/self/self_test.go | Generalized contains0RTTPacket to containsPacketType to check for any packet type |
| integrationtests/self/zero_rtt_test.go | Updated to use generalized containsPacketType function |
| integrationtests/self/http_test.go | Updated to use generalized containsPacketType function |
| integrationtests/self/handshake_drop_test.go | Added new integration test to verify packet buffering and RTT measurement during handshake with packet loss |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This logic now works across packet number spaces.
5da5779 to
e332764
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #5474.
This logic now works across packet number spaces. It avoids inflated RTT measurements when packets are buffered during the handshake.