Skip to content

Commit 200b560

Browse files
committed
bugfix: fix brpc stream consume error and batch put hash key error.
1 parent 134cd4c commit 200b560

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

xllm/core/distributed_runtime/worker_service.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,8 @@ void WorkerService::PrefetchFromStorage(
505505
break;
506506
}
507507
}
508-
if (is_completed) {
509-
close_future.wait();
510-
}
508+
509+
close_future.wait();
511510
brpc::StreamClose(*stream_id.get());
512511
});
513512

xllm/core/framework/block/block_manager_pool.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ uint32_t BlockManagerPool::pre_allocate(Sequence* sequence) {
315315
if (host_blocks.size() != num_additional_blocks) {
316316
return 0;
317317
}
318-
319-
PrefixCache::compute_hash_keys(sequence->tokens(), host_blocks);
320-
321318
sequence->host_kv_state().add_kv_blocks(host_blocks);
319+
PrefixCache::compute_hash_keys(
320+
sequence->tokens(), *sequence->host_kv_state().mutable_kv_blocks());
321+
322322
return num_additional_blocks;
323323
}
324324

@@ -400,6 +400,7 @@ void BlockManagerPool::save_offload_blocks(Sequence* sequence) {
400400
released_device_blocks_[dp_rank].back().id(),
401401
released_host_blocks_[dp_rank].back().id(),
402402
released_host_blocks_[dp_rank].back().get_immutable_hash_value(),
403+
released_host_blocks_[dp_rank].back().get_hash_value_len(),
403404
TransferType::D2G));
404405
}
405406
host_block_managers_[dp_rank]->cache(

0 commit comments

Comments
 (0)