Repository navigation
relay: resolve a pipelined joining FETCH against its own subscription - #783
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (4)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openmoq/moqx/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughLocal-forwarder joining FETCH requests now wait for subscription setup, resolve against the resulting subscription, and dispatch as standalone fetches. Resolution errors are returned without forwarding unresolved requests upstream. ChangesJoining FETCH handling
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Joining FETCH requests now wait for their pipelined SUBSCRIBE setup and resolve against it, and failures return errors instead of going upstream unresolved. Tests cover delayed setup, setup failure, a missing subscription and a mismatched request ID. No concrete merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change narrows upstream forwarding by resolving joining requests against the caller’s subscription and rejecting unresolved requests. No introduced security vulnerability was established. Remaining uncertainty concerns production authorization and how waiting requests are bounded and cancelled. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
In local-forwarder mode, a joining FETCH pipelined behind its SUBSCRIBE could arrive before the relay finished setting up that subscription. The relay sent such a fetch upstream unresolved, where the publisher resolved it against the relay's own upstream subscription and its old or missing Largest. The fetch now waits for the setup and resolves against the joiner's Largest. A joining fetch that does not resolve fails at the relay. The wait adds an upstream RTT on a cold track and lets the cache serve the fetch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
01ba7bb to
0231329
Compare
|
@coderabbitai Thanks for the review. Addressed in 0231329: the setup could finish before the waiting task started, and the readiness-guarded loop then skipped re-resolution. The helper now waits and re-resolves at least once. Not addressing:
🤖 Generated with Claude Code |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
ast-grep outline src/MoqxRelay.cpp --items all --match 'resolveJoiningFetchOnSubscriberExec|fetch|subscribe|removeSubscriber' --view expanded
rg -n -C4 'resolveJoiningFetchOnSubscriberExec|setupComplete|setupPromise|joiningRequestID' src/MoqxRelay.cpp src/MoqxRelay.h
git show --stat 02313297Length of output: 5580 🏁 Script executed: #!/bin/bash
sed -n '210,270p' src/MoqxRelay.cpp
sed -n '2290,2415p' src/MoqxRelay.cpp
sed -n '2575,2604p' src/MoqxRelay.cpp
rg -n -C5 'setupPromise|setupBaton|pendingSetup|\.erase\(|removeSubscriber\(|getSubscriber\(' src/MoqxRelay.cppLength of output: 11860
I checked the updated code:
✏️ Learnings added
You are interacting with an AI system. |
gmarzot
left a comment
There was a problem hiding this comment.
@gmarzot reviewed 3 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on akash-a-n).
In local-forwarder mode, a joining FETCH pipelined behind its SUBSCRIBE could arrive before the relay finished setting up that subscription. The relay sent such a fetch upstream unresolved, where the publisher resolved it against the relay's own upstream subscription and its old or missing Largest. The fetch now waits for the setup and resolves against the joiner's Largest. A joining fetch that does not resolve fails at the relay. The wait adds an upstream RTT on a cold track and lets the cache serve the fetch.
This change is
Summary by CodeRabbit