Add comment and test for bio RDB disk transfer receive timeout - #4277
Conversation
The `replicaReceiveRDBFromPrimaryToDisk`, introduced in valkey-io#1784, incorrectly uses `repl_syncio_timeout` (default 5s) for the socket receive timeout during RDB bulk transfer. This timeout is intended for short synchronous I/O operations during the handshake phase. Signed-off-by: Binbin <binloveplay1314@qq.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReplication handshake cancellation now documents that a Bio thread blocked in an RDB socket read can delay the main thread up to ChangesReplication handshake cancellation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #4277 +/- ##
============================================
- Coverage 76.84% 76.79% -0.05%
============================================
Files 162 162
Lines 81479 81479
============================================
- Hits 62610 62571 -39
- Misses 18869 18908 +39
🚀 New features to boost your workflow:
|
Signed-off-by: Binbin <binloveplay1314@qq.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/integration/replication.tcl`:
- Around line 1708-1712: Update the cancellation test around the $replica
replicaof no one call to measure its elapsed duration and assert it stays below
a tolerant upper bound that is shorter than the normal repl-timeout, while
retaining the existing slow-command log assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a250b14c-d16e-4591-b905-9bf95bb15dec
📒 Files selected for processing (2)
src/replication.ctests/integration/replication.tcl
Signed-off-by: Binbin <binloveplay1314@qq.com>
…y-io#4277) The disk-saving bio thread bounds its blocking RDB read with repl_syncio_timeout, and the abort flag is only checked between reads, so a silent primary can stall the main thread in cancelReplicationHandshake() for up to that timeout. No behavior change: just document why repl_syncio_timeout is used here instead of repl-timeout, and add a test covering the abort path. Signed-off-by: Binbin <binloveplay1314@qq.com> Signed-off-by: Alon Arenberg <alonare@amazon.com>
The disk-saving bio thread bounds its blocking RDB read with
repl_syncio_timeout, and the abort flag is only checked between
reads, so a silent primary can stall the main thread in
cancelReplicationHandshake() for up to that timeout.
No behavior change: just document why repl_syncio_timeout is
used here instead of repl-timeout, and add a test covering the
abort path.