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

Loss detection fixes #1729

Merged
merged 14 commits into from
Jan 29, 2025
Merged

Loss detection fixes #1729

merged 14 commits into from
Jan 29, 2025

Conversation

vyazelenko
Copy link
Contributor

@vyazelenko vyazelenko commented Jan 23, 2025

Loss detection takes into account length of the gap which can change over time, i.e. shrink when the messages are received out of order or increase if new heartbeats advance rcv-pwm position.

@vyazelenko vyazelenko requested review from mikeb01 and mjpt777 January 23, 2025 22:25
…ease when heartbeats advance the high-water mark position, or it can decrease if messages arrive out of order. In both cases we want to adjust the NAK range of the receiver.
…tion to ensure the widest possible loss detection scan window.

Loss detection code is concurrent to the application threads that are consuming from the image but also to the receiver thread that inserts new packets into the image and advances the high-water mark position counter. Reading that counter last ensures that we take into account all inserted packets up to this point.
… never zero. Also do not track padding bytes as the "sent bytes".
…-water mark on the receiver.

A single network packet might contain multiple frames (up to an MTU). When such packet contains only `HDR_TYPE_DATA` then packet length will correspond to the combined lengths of the frames it contains. However, if there is a trailing `HDR_TYPE_PAD` packet then the packet length will not be equal to the sum of the frame sizes.

For example, given a packet containing two 80 byte messages (whose aligned length is 128 bytes each) and a padding for 224 bytes. The length of the packet will be 288 bytes (256 + 32) but the "frame size" will be 512 bytes (256 + 256).
…ENGTH` and streamlining non-zero frame lookup.
…s trailing padding frame + rename method that computes the target position offset.
…will advance on next heartbeat/data frame anyway.
…s almost never zero. Also do not track padding bytes as the "sent bytes"."

This reverts commit 411f102.
…ild position to ensure the widest possible loss detection scan window."

This reverts commit 60e6047.
…e when heartbeats advance the high-water mark position, or it can decrease if messages arrive out of order. In both cases we want to adjust the NAK range of the receiver.
@vyazelenko vyazelenko merged commit 5db3ae0 into aeron-io:master Jan 29, 2025
53 checks passed
@vyazelenko vyazelenko deleted the nak-issues branch January 29, 2025 13:39
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.

1 participant