fix(moq): reconcile publisher history construction - #75
Merged
Conversation
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Author
1 similar comment
Author
Author
Author
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: b41650d
Critical Issues (0)
Important Issues (1)
- [gstack/review]
moq-transport/src/serve/subgroup.rs:139— Bounded tracks now reject a valid out-of-order subgroup instead of retaining it.Subgroupexplicitly allows group IDs to be received out of order (subgroup.rs:308), and a subscriber applies the advertised history window to its relay mirror before passing inbound subgroup headers to this writer. Thus a peer sending group 10 followed by group 9 causesServeError::Duplicateand aborts receive processing, losing valid data. The new test codifies that regression.- Preserve out-of-order acceptance for received subgroups and make pruning independent of insertion order, or limit this monotonicity rule to the local MMTP publisher path.
Suggestions (0)
Strengths
subgroups_with_historykeeps history configuration and SUBSCRIBE_OK propagation coupled at construction time.- The
u64::MAXpruning case has targeted regression coverage.
Recommended Action
- Address the Important issue before merge.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Author
Author
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 8ef99a2
Critical Issues (0)
Important Issues (1)
- [native-codex]
moq-transport/src/serve/subgroup.rs:252— still returns the last-created retained subgroup, not the largest . Out-of-order acceptance now makes insertion order diverge from sequence order: after receiving group 11 and then a valid late group 10, reports group 10. That location is used for subscription/resume state and can make a peer start from stale history or omit group 11.- Select the maximum retained location by group/object ordering (rather than ), and add a regression that appends an older group after the newest one.
Suggestions (0)
Strengths
- Immutable creation indexes correctly avoid shifting reader cursors when history pruning removes a non-prefix entry.
- The pruning predicate handles safely and the new tests exercise the intended out-of-order retention window.
Recommended Action
- Fix the Important issue this cycle before relying on out-of-order subgroup support for resume locations.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Author
Author
There was a problem hiding this comment.
Ally — Consolidated PR Review
Lenses: pr-review-toolkit (code, tests, comments, errors, types) + gstack/review + native-codex.
Reviewed head: 3ae50d6
Prior Findings Dispositioned (2)
- prior:b41650d important 1 — fixed —
moq-transport/src/serve/subgroup.rs:192— pruning now retains entries throughVecDeque::retainacross the complete creation-order queue, rather than assuming out-of-order subgroup groups form a removable prefix. - prior:8ef99a2 important 1 — fixed —
moq-transport/src/serve/subgroup.rs:238—latest()now takes the maximum retained(group_id, object_id)instead of using the final creation-order entry.
Critical Issues (0)
Important Issues (0)
Suggestions (0)
Strengths
subgroups_with_historyatomically persists the history window before transitioning the track, preserving SUBSCRIBE_OK propagation.- Regression coverage exercises both out-of-order retention and the latest-location ordering case.
Recommended Action
- No blocking issues found in this revision.
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.
Summary
TrackWriter::subgroups_with_history(NonZeroU64)onmainwhile preserving sharedTrackStatepropagation into SUBSCRIBE_OKu64::MAXsemantics while accepting valid out-of-order relay subgroups(group_id, object_id)for subscription/resume state even when creation order differsHead / Base
main3ae50d6d4b314b05bd8cc825d9f1ca3b17f97258Compatibility
Verification
cargo test -p moq-transport -p moq-pub-mmtp: 280 + 73 unit tests passed; integration/example tests also passedhistory_window_accepts_out_of_order_groups_and_prunes_by_id: sequence10, 9, 8, 11, window 3, retains10, 9, 11latest_uses_largest_group_after_out_of_order_create: group 11 followed by late group 10 still reports(11, 0)cargo fmt --all -- --check: passedcargo clippy -p moq-transport -p moq-pub-mmtp -- -D warnings: passedcargo clippy ... --all-targets -- -D warnings: blocked by pre-existingdrop_non_dropinmoq-transport/src/session/subscriber.rs:1899Risks
Paperclip: https://paperclip.blockcast.net/BLO/issues/BLO-23538