Skip to content

Commit c70b301

Browse files
authored
[nixl] fix: missing metadata for handshake in multi-node (#1576)
Signed-off-by: AlpinDale <alpindale@gmail.com>
1 parent e1f2cc9 commit c70b301

6 files changed

Lines changed: 304 additions & 95 deletions

File tree

aphrodite/distributed/kv_transfer/kv_connector/v1/base.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ class KVConnectorRole(enum.Enum):
116116
WORKER = 1
117117

118118

119+
class KVConnectorHandshakeMetadata(ABC): # noqa: B024
120+
"""
121+
Metadata used for out of band connector handshake between
122+
P/D workers. This needs to serializeable.
123+
"""
124+
125+
pass
126+
127+
119128
class KVConnectorMetadata(ABC): # noqa: B024
120129
"""
121130
Abstract Metadata used to communicate between the
@@ -314,6 +323,17 @@ def get_kv_connector_stats(self) -> Optional["KVConnectorStats"]:
314323
"""
315324
return None
316325

326+
def get_handshake_metadata(self) -> KVConnectorHandshakeMetadata | None:
327+
"""
328+
Get the KVConnector handshake metadata for this connector.
329+
This metadata is used for out-of-band connector handshake
330+
between P/D workers.
331+
Returns:
332+
KVConnectorHandshakeMetadata: the handshake metadata.
333+
None if no handshake metadata is available.
334+
"""
335+
return None
336+
317337
# ==============================
318338
# Scheduler-side methods
319339
# ==============================
@@ -471,6 +491,16 @@ def build_kv_connector_stats(
471491
"""
472492
return None
473493

494+
def set_xfer_handshake_metadata(
495+
self, metadata: dict[int, KVConnectorHandshakeMetadata]
496+
) -> None:
497+
"""
498+
Set the KV connector handshake metadata for this connector.
499+
Args:
500+
metadata (KVConnectorHandshakeMetadata): the handshake metadata to set.
501+
"""
502+
return None
503+
474504
@classmethod
475505
def build_prom_metrics(
476506
cls,

0 commit comments

Comments
 (0)