Repository navigation
perf #345: remove dead unary AppendEntries path and stale scaffolding - #367
Conversation
Hot-path migration to per-peer persistent bidi stream was completed in #333/#334. This commit removes everything left behind from the old unary batch RPC path: - Drop `handle_raft_request_in_batch` from `ReplicationCore` trait and `ReplicationHandler` impl (~210 lines) - Remove directly-coupled dead imports (`AppendResults`, `NodeRole`, `append_entries_response`, `info`, `RaftContext`, `Transport`, `is_majority`) from `replication_handler.rs` and `mod.rs` - Remove stale mock setup for `handle_raft_request_in_batch` in `node_test.rs` and `leader_state_bench.rs` - Clean up outdated comments referencing old unary path in `replication_test.rs`, `client_write_test.rs`, and `default_state_machine_handler_test.rs` No behaviour change. Core replication semantics unchanged.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
💤 Files with no reviewable changes (3)
📝 WalkthroughWalkthroughThis PR removes the ChangesTrait & Implementation Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
What Does This PR Do?
Removes the dead unary
handle_raft_request_in_batchpath and all stalescaffolding left behind after the hot-path migration to per-peer persistent
bidi streams landed in #333/#334.
Type:
Why Is This Needed?
Closes #345.
The per-peer bidi stream replication hot path was completed in #333/#334
as part of v0.2.4. The old unary
handle_raft_request_in_batchcode pathwas no longer on the hot path but remained in the codebase, creating ~210
lines of dead code, stale mocks, and misleading comments that no longer
reflected production behaviour.
Checklist
Required:
make testpassesIf changing APIs:
Testing
How tested:
cargo nextest run --all-featurespasses — all affectedtests (
run_success_without_joining,test_learner_bootstrap_success,test_merge_batch_to_write_metadata_empty_payload_with_senders) verifiedFor performance improvements:
cargo check --benches; staleAppendResults/PeerUpdatemock inleader_state_benchremoved —benchmark itself unchanged, no regression possible from pure deletion
Does This Follow d-engine's Principles?
Reviewer Notes
Pure deletion PR — no logic change, no new code. Focus areas:
replication/mod.rs— confirmhandle_raft_request_in_batchtraitmethod is fully gone and no callers remain
replication_handler.rs— confirm removed imports were exclusivelyused by the deleted method
node_test.rsandleader_state_bench.rs— confirmthe remaining mock setup is still sufficient for existing test coverage
Estimated review complexity:
Summary by CodeRabbit