[P/D] MultiConnector supports shutdown (#24425)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
Chauncey 2025-09-10 12:24:11 +08:00 committed by GitHub
parent b4a01aaf95
commit 309d7aa401
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,6 +88,18 @@ class MultiConnector(KVConnectorBase_V1):
for c in self._connectors:
c.clear_connector_metadata()
def shutdown(self):
exception: Optional[Exception] = None
for c in self._connectors:
try:
c.shutdown()
except Exception as e:
logger.exception("Exception during connector %s shutdown.",
c.__class__.__name__)
exception = e
if exception:
raise exception
# ==============================
# Worker-side methods
# ==============================