revert: websocket close timeout collector fix - #16
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a3989cfb7
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| close_timeout=1, | ||
| ping_interval=20, | ||
| max_size=8 * 1024 * 1024, | ||
| url, open_timeout=20, ping_interval=20, max_size=8 * 1024 * 1024 |
There was a problem hiding this comment.
Keep websocket close under cancellation budget
When a receiver is cancelled during shutdown or reconnect, exiting this async with connect(...) must complete before cancel_tasks_bounded()'s 5-second TASK_CANCEL_TIMEOUT_SECONDS budget; without an explicit close_timeout, websockets uses a 10-second close timeout, so a peer that doesn't complete the close handshake quickly can leave the receiver pending long enough to raise TaskCancellationStuck and force the collector down the fatal restart path instead of rotating cleanly.
Useful? React with 👍 / 👎.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe Binance LOB archiver removes the explicit websocket ChangesWebSocket shutdown configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Production rollout disproved the PR #15 hypothesis: USD-M still hit
TaskCancellationStuck pending=1and restarted after 11 minutes withclose_timeout=1.Action
Evidence
python3 -m unittest deployment/aliyun/test_binance_lob_archiver.py(29 passed)python3 -m py_compile deployment/aliyun/binance_lob_archiver.py deployment/aliyun/test_binance_lob_archiver.pySummary by CodeRabbit