vllm.distributed.ec_transfer.ec_connector.mooncake.worker
¶
Worker-side orchestration of Mooncake control, memory, and data planes.
Consumer Workers expose rank-local reservations and publish received tensors. Producer Workers reserve every destination shard, bind computed sources, run batched Mooncake writes, and report asynchronous completion to the Scheduler.
Classes:
-
ECMooncakeWorker–Orchestrate consumer reservations and producer push batches.
ECMooncakeWorker
¶
Orchestrate consumer reservations and producer push batches.
Consumers may use TP, PP, and DP. Only the first PP stage receives encoder outputs, and each TP rank exposes a consecutive control port and receives the same source concurrently. Producers remain unsharded and unreplicated. With DP, the caller must route both halves of a request to the same replica and pass that replica's control address to the producer.
Methods:
-
reset–Invalidate published ConsumerMemoryPool residents after a reset.
_abandon_pushes(pushes)
¶
Release the consumer-side reservations of a batch that failed.
_notify_completions(notifications)
¶
Tell the consumer, in one message per destination, what landed.
_reserve_batch(records)
¶
Resolve independent item futures with one reserve RPC per shard.
_reserve_remote(spec)
¶
Reserve a destination on every shard of the consumer.
_resolve_consumer_rank()
¶
Place this worker in the consumer receive topology.
_run_fanout(tasks, on_submit=None)
¶
Run every started shard task and retain partial results on failure.
Waiting for all submitted tasks is what makes source-memory release and partial-reservation cleanup safe after one shard fails.
_shard_executor()
¶
Use a separate pool so nested shard fan-out cannot deadlock.
reset()
¶
Invalidate published ConsumerMemoryPool residents after a reset.
reset_encoder_cache already clears the worker encoder cache,
and the Scheduler expires its own records. Unleased published
residents are evicted at once; leased ones are marked
invalidated, so lookups miss, take refuses their stale READY
leases, and the entry is evicted at final lease release.
In-flight WRITING reservations are not cancelled. Safe to call
before the receive slab is prepared.