Repository navigation
[PD] Fix KV cache corruption on abort by notifying ongoing prefill - #27372
Conversation
…ing slot release Signed-off-by: Shangming Cai <csmthu@gmail.com>
|
/rerun-group disaggregation |
|
Results for 🚀 🚀 🚀 🚀 🚀 🚀 ⛔ Known runner_configs: |
There was a problem hiding this comment.
Code Review
This pull request introduces a deferred KV cache release mechanism for decode-initiated aborts to prevent RDMA corruption from in-flight prefill writes. It implements an abort notification flow using ABORT and ABORT_ACK messages, along with a configurable grace period. The review feedback highlights a critical bug where an incorrect attribute name (decode_initiated_abort instead of abort_initiated) disables the deferred release mechanism. Additionally, the reviewer noted potential background thread crashes due to unvalidated message parsing and a potential memory leak from late-arriving ABORT_ACK messages.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Signed-off-by: Shangming Cai <csmthu@gmail.com>
|
/rerun-group disaggregation |
|
Results for 🚀 🚀 🚀 🚀 🚀 🚀 ⛔ Known runner_configs: |
…gl-project#27372) Signed-off-by: Shangming Cai <csmthu@gmail.com>
Motivation
A lightweight alternative to #24580. This should address almost all race conditions caused by long ITL aborts.
Note: this PR cannot address the case when an ongoing prefill has already called a transfer sync that would take a very long time (maximum value -> mooncake timeout: 30s), but this case has an extremely low probability of happening (extremely hard to reproduce). We could introduce deferred release of decode-side KVCache to fix this as well, but this could harm the performance of the pre-allocation process of decode (considering this aborted req is a large ITL req that will occupy many many KVCache slots).
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ❌ Run #27023869436
Latest PR Test (Extra): ❌ Run #27023869006