Repository navigation
[Bugfix] remote backend: async get must read the worker-0 keys in MLA worker-id-as-0 mode - #30
Open
ibrahimnd2000 wants to merge 1 commit into
Open
ibrahimnd2000 wants to merge 1 commit into
ibrahimnd2000 wants to merge 1 commit into
Conversation
… worker-id-as-0 mode With `remote_enable_mla_worker_id_as0` (the MLA default), chunks are stored under worker 0, and `RemoteBackend.batched_async_contains` and the blocking get rewrite keys to worker 0: Ported from LMCache/LMCache#5550: the in-process engine moved to this repository in LMCache/LMCache#6254. Signed-off-by: Muhammad Ibrahim <ibrahimnd2000@gmail.com>
This was referenced Nov 12, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
With
remote_enable_mla_worker_id_as0(the MLA default), chunks are stored under worker 0, andRemoteBackend.batched_async_containsand the blocking get rewrite keys to worker 0:batched_get_non_blocking(the async prefetch path) did not. So any worker other than 0 that does an async lookup + prefetch finds its chunks with EXISTS, then asks for keys that do not exist. With the RESP connector that GET also never returns: the native client blocks on the nil reply, which I'll fix in a separate PR.This hasn't shown up upstream because only worker 0 does async lookups in MLA mode. It does once more workers prefetch. We hit it with the sharded PCP store (#5545), where every rank prefetches its own chunks: after an engine restart every L2 prefetch timed out (
batched_get_non_blocking timed out) and nothing was loaded. With this fix the same run loaded 12,800–166,656 tokens per prompt from L2.Special notes for your reviewers:
batched_async_contains.tests/inprocess/v1/storage_backend/test_remote_async_get_worker0_key.py: the async get now receives the same worker-0 keys as the async contains (fails ondev), and keys are unchanged outside that mode.If applicable: