-
-
Notifications
You must be signed in to change notification settings - Fork 106
fix: Phase 2 - Fix transaction ID mismatch for subscription responses (#1848) #1851
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
fix: Phase 2 - Fix transaction ID mismatch for subscription responses (#1848) #1851
Conversation
…#1848) The root cause of subscription timeouts was a transaction ID mismatch: - RequestRouter created one transaction ID for tracking the client request - But subscribe operation created a different transaction ID internally - Result delivery used the operation's ID, not the RequestRouter's ID - Client was waiting for wrong transaction ID, never received response Changes: - Add start_op_with_id() to subscribe operations (like other ops have) - Use RequestRouter's transaction ID when starting subscribe operations - Ensures client waits for the correct transaction ID This fixes the "Timeout waiting for subscribe response" error in River. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
[Codex] I like the idea of aligning the operation transaction ID with the one the request router already generated. However, by bypassing Maybe we could extend |
[Codex] I also noticed this PR still short-circuits on the first |
[AI-assisted debugging and comment] Response to [Codex] Comment 1: Missing
|
.inspect_err(|err| { | ||
tracing::error!("Subscribe error: {}", err); | ||
})?; | ||
// Phase 2 fix: Use the transaction_id from RequestRouter for consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to mention "Phase 2 fix:"
Summary
Phase 2 fix for the update propagation architecture issue identified in #1848.
This PR fixes the root cause of "Timeout waiting for subscribe response" errors that prevented River chat from working.
The Bug
The subscription timeout was caused by a transaction ID mismatch:
A
and registers client to wait for itB
internallyB
A
, never receives response → timeoutThe Fix
start_op_with_id()
to subscribe operations (matching pattern used by get/put/update)Test Results
✅ River chat test now passes:
Dependencies
This PR is based on #1850 (Phase 1). Once #1850 is merged, this can be rebased onto main.
Related Issues
[AI-assisted debugging and comment]
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]