Skip to content

vllm.distributed.ec_transfer.ec_connector.mooncake.scheduler

Scheduler-side planning and observation for Mooncake cache transfers.

The Scheduler prepares Producer reservations, consumes Consumer readiness events, emits per-step Worker metadata, and converts Worker results back into request availability without owning tensor memory or running data transfers.

Classes:

ECMooncakeScheduler

Coordinate Mooncake transfers from the vLLM Scheduler process.

Methods:

  • reset –

    Invalidate local encoder-cache bookkeeping after a cache reset.

_warn_unresolved_transfer_id(request, index, where)

Report an ec_items entry that cannot be matched to a feature.

A caller that cannot resolve a transfer id has to fall back to a locally invented one or skip its bookkeeping entirely, and either way the two sides of a transfer stop agreeing on its name. That desyncs silently -- reservations are never released and only surface minutes later as a full buffer pool -- so say it out loud the first time.

mm_hash in ec_items must be a value some engine reported, never one the caller derived itself: mm_features[i].identifier folds in the engine's media_io_kwargs and mm_processor_kwargs, so a media uuid alone no longer equals it. Omit the field to match by position instead.

reset()

Invalidate local encoder-cache bookkeeping after a cache reset.

reset_encoder_cache already clears EncoderCacheManager and the worker encoder cache. _local_cache is only a mirror of that cache; leaving it in place lets ensure_cache_available skip Load and hit an encoder cache miss. Consumed READY/RESIDENT records are expired so a later request cannot treat a consumed transfer_id as a cache hit. Unconsumed AVAILABLE reservations remain Load-able. This does not make in-flight reset concurrency-safe.