Repository navigation
perf(sglang): isolate sidecar request shutdown waiters - #14727
Conversation
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review. WalkthroughThe SGLang engine now derives a child cancellation token for each request. An integration test verifies isolated stream cancellation, engine cleanup cancellation, post-cleanup request handling, and prompt completion. ChangesSGLang cancellation behavior
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Request cancellation remains isolated while engine shutdown still cancels active and future streams. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Summary
Give each SGLang gRPC generation request a child of the engine shutdown token. This separates cancellation waiters across concurrent streams while preserving engine-wide shutdown propagation. The native HTTP path is unchanged.
Add one regression test using the existing mock gRPC server to check that cancelling one request leaves other requests running, engine shutdown cancels the remaining streams, and requests created after shutdown finish as cancelled. Existing tests cover native HTTP cancellation and the gRPC Abort RPC, but not propagation through the gRPC generation shutdown token. The new test reuses the existing gRPC integration fixture.
Validation
cargo test --locked -p dynamo-sglang-mocker --test sidecar request_cancellation_is_isolated_and_shutdown_reaches_grpc_streams: passed.cargo fmt -p dynamo-sglang-sidecar -p dynamo-sglang-mocker -- --checkandgit diff --checkpassed.Related Issues
Summary by CodeRabbit