Skip to content

feat: [NCS] Add Near-Compute Storage (NCS) core infrastructure#54

Open
ronmarcus wants to merge 3 commits into
zilliztech:masterfrom
ronmarcus:ncs
Open

feat: [NCS] Add Near-Compute Storage (NCS) core infrastructure#54
ronmarcus wants to merge 3 commits into
zilliztech:masterfrom
ronmarcus:ncs

Conversation

@ronmarcus

Copy link
Copy Markdown

This commit introduces the core infrastructure for Near-Compute Storage (NCS), a shared hot storage tier designed to decouple compute and storage in Milvus.

Key changes:

  • Added NcsSingleton, NcsFactory, and NcsConnector interfaces to abstract storage backends.
  • Implemented InMemoryNcs and InMemNcsConnector backed by InMemoryKV for testing.
  • Implemented RedisNcs and RedisNcsConnector as a reference remote storage backend.
  • Exposed C-compatible API (ncs_c.h) to allow integration with the Milvus Go control plane.
  • Added unit tests for both In-Memory and Redis implementations.

This infrastructure enables upper layers (Knowhere, Milvus) to interact with disaggregated storage through a unified Key-Value API.

issue: milvus-io/milvus#45178

Ron Marcus added 2 commits January 1, 2026 17:24
This commit introduces the core infrastructure for Near-Compute Storage (NCS),
a shared hot storage tier designed to decouple compute and storage in Milvus.

Key changes:
- Added `NcsSingleton`, `NcsFactory`, and `NcsConnector` interfaces to abstract storage backends.
- Implemented `InMemoryNcs` and `InMemNcsConnector` backed by `InMemoryKV` for testing.
- Implemented `RedisNcs` and `RedisNcsConnector` as a reference remote storage backend.
- Exposed C-compatible API (`ncs_c.h`) to allow integration with the Milvus Go control plane.
- Added unit tests for both In-Memory and Redis implementations.

This infrastructure enables upper layers (Knowhere, Milvus) to interact with
disaggregated storage through a unified Key-Value API.

issue: milvus-io/milvus#45178
- Improve Redis NCS connector to use Redis pipelining
- Merge unit tests for all NCS kinds
- Add concurency test using multiple NcsConnector
Comment thread include/common/EasyAssert.h Outdated
Comment thread include/common/SpanBytes.h Outdated
Comment thread include/ncs/InMemNcsConnector.h Outdated
Comment thread include/ncs/RedisNcsConnector.h Outdated
Comment thread include/common/SpanBytes.h Outdated
Comment thread include/ncs/RedisNcs.h Outdated
Comment thread include/common/SpanBytes.h Outdated
Comment thread include/ncs/RedisNcsConnector.h Outdated
Comment thread src/ncs/RedisNcs.cpp Outdated
Comment thread CMakeLists.txt Outdated
- Use std::unique_ptr for Redis resources (redisContext/redisReply)
- Add USE_REDIS CMake option to make Redis support optional
- Delete copy/move operations for NcsConnector
- Initialize all member variables with default values
- Reorganize error codes (moved NcsUploadError to 2044)
- Remove using clauses from header files
@ronmarcus

Copy link
Copy Markdown
Author

@alexanderguzhva thanks for the feedback! I've addressed the comments in the latest commit. Happy to make further adjustments if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants