Md/s2#1938
Conversation
Introduce the metadata-exchange backend layer without wiring it in yet: the nixlMetadataBackend contract, the nixlMetadataContext interface (the agent-side operations a backend needs), and the self-contained P2P (socket) backend that implements the contract against the context. Nothing constructs these yet; the agent still uses its inline path. The manager that owns and dispatches to backends, and the cutover that removes the inline path, come in the following commit. Splitting the introduction out keeps that cutover reviewable on its own.
Wire the backend layer in and remove the inline path. nixlAgentData now owns a nixlMDManager (built unconditionally) that owns the worker thread and dispatches each call to a backend by precedence: a peer address selects P2P, otherwise the configured centralized store (ETCD). Add the self-contained ETCD backend (owns its nixlEtcdClient). nixlAgent's exchange methods (sendLocalMD, sendLocalPartialMD, fetchRemoteMD, invalidateLocalMD) become thin wrappers over the manager; pure-cache operations are consolidated on nixlAgentData, which implements nixlMetadataContext for the backends. nixl_listener.cpp is deleted: its worker loop moves into the manager, its socket helpers into the P2P backend, and its etcd client into the ETCD backend. Public API and observable P2P/ETCD behavior are unchanged; gtest log expectations are updated to the new backend messages.
|
👋 Hi aschwartz12! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
🤖 CI Triage Agent — TL;DR: The Clang Format Check failed because Full analysisSummary: GitHub Actions Root cause: Two changed lines in
This is a genuine lint failure, not a hang or timeout — the whole job ran in ~14 seconds with continuous output. Implicated commit: [REDACTED:Hex High Entropy String] (PR #1938, branch File: Suggested fix: Run clang-format on the affected file and commit the result: Specifically: remove the space before Related: PR #1938 (the PR whose merge commit
|
PR2 - refactor(metadata): manager cutover and ETCD backend
Branch
md/s2(8cb65310), stacked on PR1 (md/s1). Second slice of the4-PR metadata-manager stack. This is the irreducible core: it wires the manager,
adds the ETCD backend, flips
nixlAgentto the manager as the single metadatapath, and deletes
nixl_listener.cpp.After this commit, all P2P and ETCD metadata exchange runs through
nixlMDManagerand its backends. The publicnixlAgentmetadata API isunchanged.
What?
Adds the manager and ETCD backend, rewires the agent, and removes the old path:
nixl_md_manager.{cpp,h}— owns the worker thread, routes calls to backendsnixl_etcd_metadata_backend.{cpp,h}— self-contained ETCD client and watch loopnixl_agent.cpp— exchange methods become thin manager wrappers; inlinesocket/etcd/comm-thread code removed
agent_data.h— implementsnixlMetadataContext, drops comm-thread members,owns
nixlMDManagernixl_listener.cpp— deleted (-820 lines)PR1's P2P backend (from
md/s1) is now wired through the manager.Why?
Manager, ETCD backend, and
nixl_listener.cppdeletion are symbol-coupled:nixl_listener.cppdefinesnixlEtcdClientanddefault_metadata_label, whichthe ETCD backend and manager also define. They cannot land in separate PRs without
duplicate-symbol link errors or a risky two-worker hybrid state.
This commit is the behavioral cutover. Reviewers should focus on: does the new
path preserve P2P and ETCD semantics?
How?
Manager -
nixlMDManageris owned bynixlAgentDataand is the single path forall metadata exchange. It owns one worker thread and routes each call by
precedence: a peer address selects P2P, otherwise the configured ETCD store
backend.
Backends - P2P (from PR1) and ETCD (new) implement
nixlMetadataBackend. Eachis self-contained;
serviceEvents()drives watch/accept/read loops on theworker thread, gated by
needsWorker().Cutover -
nixl_listener.cppis deleted. Its comm-worker loop moves into themanager's worker; socket helpers already live in the P2P backend (PR1); the
nixlEtcdClientmoves into the ETCD backend.Agent -
nixlAgentDataimplementsnixlMetadataContextfor the backends.Pure-cache operations (
getLocalMD,loadRemoteMD, etc.) consolidate onnixlAgentData. Exchange methods delegate to the manager.Scope - No public API change. P2P and ETCD behavior preserved. TCPStore lands
in PR4. Gtests for the manager land in PR3.
Size
~1179 lines added, ~1056 deleted across 9 files. Slightly over the 1000-line
added target; the deletions (mostly
nixl_listener.cpp) review quickly.Test plan
builddir) and the ETCD config (builddir-etcd).MetadataExchangeTestFixture(pure-cache + socket) still passes.checking out
md/s3.Stack
md/s1)md/s3) adds manager gtests; PR4 (md/s4) adds TCPStore