Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fastdeploy/engine/common_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -2125,7 +2125,8 @@ def _process_allocate_resource_requests():

if not is_success:
if not self.enable_decode_cache_task:
task.error_msg = "Not enough resources"
if not task.get("error_msg", None):
task.error_msg = "Not enough resources"
self.split_connector.send_cache_info_to_prefill([task])
self.llm_logger.warning(f"D has failed to send cache infos for task {task.request_id}")
processed_indices.append(idx)
Expand Down
7 changes: 7 additions & 0 deletions fastdeploy/engine/sched/resource_manager_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,13 @@ def preallocate_resource_in_d(self, request: Request):
) // self.config.cache_config.block_size + self.config.cache_config.enc_dec_block_num

with self.lock:
if request.request_id in self.requests:
llm_logger.warning(
f"PD reschedule: request {request.request_id} already exists in D, "
f"rejecting to avoid KV cache conflict"
)
request.error_msg = "Duplicate request id in decode"
return False
Comment thread
cmcamdy marked this conversation as resolved.
if len(self.waiting) > 0:
return False
if self.available_batch() == 0:
Expand Down
Loading