-
Notifications
You must be signed in to change notification settings - Fork 219
Fix ctx timeout for node connect during nodes sync pipeline #1637
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
Conversation
For local and cluster nodes we have now context created for each async run. This will not timeout whole sync pipeline when node connect takes 20 seconds (pipeline ctx timeout). Limit is set for each async execution.
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
We were creating new instance of ctx with span called spanCtx. This is not needed as original ctx is not ment to be used again so we can just re-assign already existing ctx var.
379899f to
1879a28
Compare
Note
Introduce 5s per-node connect timeouts and unify context/trace usage so slow node connections don’t stall the sync loop.
packages/api/internal/orchestrator/cache.go)nodeConnectTimeout(5s) and wrap per-node connects withcontext.WithTimeoutinsyncLocalDiscoveredNodesandsyncClusterDiscoveredNodesto avoid blocking the sync cycle.ctxfromtracer.Start(...)acrosssyncNodes,syncLocalDiscoveredNodes,syncClusterDiscoveredNodes, and syncing existing nodes; update error logs to use the samectx.context.WithoutCancel(ctx)and deregister the node.Written by Cursor Bugbot for commit f396e39. This will update automatically on new commits. Configure here.