-
Notifications
You must be signed in to change notification settings - Fork 129
fix: boot dupe runners #3377
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: boot dupe runners #3377
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Pull Request Review: Fix Boot Dupe RunnersSummaryThis PR addresses duplicate runner boot issues by implementing an eviction mechanism using publish/subscribe patterns. The changes prevent race conditions when multiple runners with the same ID or namespace+name+key combination attempt to connect. Code Quality & Best Practices✅ Strengths
|
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
| create_ts: ctx.create_ts(), | ||
| }) | ||
| .await?; | ||
|
|
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.
won't removing this cause history diversion?
| } | ||
| } | ||
|
|
||
| pub struct RunnerEvictionByNameSubject { |
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.
name is misleading, isn't this ByKey? the name is just like the "pool"
| .subscribe(&topic) | ||
| .await | ||
| .with_context(|| format!("failed to subscribe to runner receiver topic: {}", topic))?; | ||
| let mut eviction_sub = ups.subscribe(&eviction_topic).await.with_context(|| { |
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.
join sub futs
| let (ws_to_tunnel_abort_tx, ws_to_tunnel_abort_rx) = watch::channel(()); | ||
| let (ping_abort_tx, ping_abort_rx) = watch::channel(()); | ||
|
|
||
| let tunnel_to_ws = tokio::spawn(tunnel_to_ws_task::task( |
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.
imo this naming is confusing. most of this file is tunnel logic, but it's also where all of the other ws<->pb forwarding logic happens.
b73d035 to
4e625cf
Compare
PR Review: Fix Boot Dupe RunnersI've completed a comprehensive review of this PR. Overall, the implementation addresses the duplicate runner issue with a robust eviction mechanism. Here are my findings: ✅ Strengths
🔍 Issues & ConcernsHigh Priority
Medium Priority
Low Priority
🧪 Testing Recommendations
📝 Style & Documentation
🔒 Security Considerations
Minor Issues
SummaryThe core eviction mechanism is sound, but there are several implementation details that need attention:
Please address the high-priority issues before merging. I'm happy to discuss any of these points further! |
Merge activity
|

No description provided.