Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion quest/m0/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Public API: none. Wire: none.
## Required

- [IETF22 fallback](/quest/m0/test-flakes-2/ietf22-fallback.md) - an IETF22 browser viewer follows a fallback within the media lane's bound, keeping its session and its audio
- [Draft-22 interop with a native publisher](/quest/m0/test-flakes-2/draft22-interop.md) - no "invalid fetch range" or audio gap with a Rust or C++ publisher
- [moq-tokio's close-drain test survives load](/quest/m0/test-flakes-2/tokio-close-drain.md) - `quic_client_close_drains_finished_track` stops failing land batches with "Unroutable"
- [@moq/net's close-drain tests survive load](/quest/m0/test-flakes-2/js-close-drain.md) - the lite close-drain cases pass on every full suite run
- [@moq/net's boundary-sync test survives load](/quest/m0/test-flakes-2/js-boundary-sync.md) - "a version without a boundary syncs" passes under load
Expand Down
20 changes: 0 additions & 20 deletions quest/m0/test-flakes-2/draft22-interop.md

This file was deleted.

71 changes: 52 additions & 19 deletions rs/moq-net/src/ietf/subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3670,25 +3670,22 @@ impl Subscriber {
_ => false,
};
let ranges = if bounds != sent_bounds {
let mut join = if Filter::is_draft20(self.version) {
subscribe_join(bounds.0, bounds.1, self.version)
} else {
Join {
filter: match bounds {
(None | Some(0), None) => Filter::Unfiltered,
(start, end) => Filter::Absolute {
start: ietf::Location {
group: start.unwrap_or(0),
object: 0,
},
end: end
.and_then(|end| end.checked_sub(1))
.map(|group| ietf::EndLocation { group, object: None }),
// Widen from the requested group bounds, not a fresh Next Object edge:
// that would cut the unread tail of a group already in flight.
let mut join = Join {
filter: match bounds {
(None | Some(0), None) => Filter::Unfiltered,
(start, end) => Filter::Absolute {
start: ietf::Location {
group: start.unwrap_or(0),
object: 0,
},
end: end
.and_then(|end| end.checked_sub(1))
.map(|group| ietf::EndLocation { group, object: None }),
},
fill: None,
fetch: false,
}
},
..Default::default()
};
if widened && Filter::is_draft20(self.version) {
join.fill = Some(ietf::Fill {
Expand All @@ -3699,8 +3696,6 @@ impl Subscriber {
group_order: Some(GroupOrder::Ascending),
range_filters: false,
});
} else {
join.fill = None;
}
Some(join)
} else {
Expand Down Expand Up @@ -16993,6 +16988,44 @@ mod new_group_tests {
relay.serving.abort();
}

/// Widening to an open start must retain the objects already being streamed. Next
/// Object would snapshot a later edge and cut that stream before its tail arrives.
#[kio::test]
async fn widening_to_an_open_start_does_not_rejoin_at_the_next_object() {
for end in [None, Some(7)] {
let (mut relay, mut first) = relay().await;
let (mut stream, _) = relay.accept().await;
accept(&mut stream, false, 5).await;

first.update(track::Subscription::default().with_range(6..)).unwrap();
let _ = read(&mut stream).await;
answer(&mut stream).await;

let wanted = track::Subscription::default();
let wanted = match end {
Some(end) => wanted.with_range(..end),
None => wanted,
};
first.update(wanted).unwrap();
let (id, body) = read(&mut stream).await;
assert_eq!(id, ietf::SubscribeUpdate::ID);
let msg = ietf::SubscribeUpdate::decode_msg(&mut body.decoder(VERSION), VERSION).unwrap();
let expected = match end {
None => ietf::Filter::Unfiltered,
Some(end) => ietf::Filter::Absolute {
start: ietf::Location { group: 0, object: 0 },
end: Some(ietf::EndLocation {
group: end - 1,
object: None,
}),
},
};
assert_eq!(msg.filter, Some(expected));
assert_eq!(msg.fill.unwrap().filter, Some(ietf::Filter::Relative(1)));
relay.serving.abort();
}
}

/// Delayed headers, including one already waiting for REQUEST_OK, belong to the
/// request they answer and cannot consume a later widening's fill.
#[kio::test]
Expand Down
Loading