Skip to content

[WIP] feat(diskann): add macOS support via kqueue-based async IO#557

Open
richyreachy wants to merge 44 commits into
alibaba:mainfrom
richyreachy:feat/diskann_on_arm_new
Open

[WIP] feat(diskann): add macOS support via kqueue-based async IO#557
richyreachy wants to merge 44 commits into
alibaba:mainfrom
richyreachy:feat/diskann_on_arm_new

Conversation

@richyreachy

Copy link
Copy Markdown
Collaborator

This PR adds diskann index support on macOS by implementing a kqueue-based asynchronous I/O backend as the macOS equivalent of Linux's libaio.

Uses BSD kqueue/kevent to monitor file descriptor readiness. Then performs the actual data transfer with pread:

  1. Partial read retry loop with waiting on kqueue for fd readiness and retrying on both pread and kevent;
  2. Graceful fallback to blocking pread on kqueue errors or timeouts;
  3. Shared io context;

richyreachy and others added 13 commits July 8, 2026 10:58
The index_group_by_test uses DiskAnn indexes (guarded by
#if DISKANN_SUPPORTED) to verify that group_by search is rejected
for unsupported index types. However, the CMakeLists.txt for
tests/core/interface/ did not link core_knn_diskann, causing the
DiskAnn factory to not be registered at runtime. This resulted in
IndexFactory::CreateAndInitIndex returning nullptr for DiskAnn
indexes, failing the test assertion.

Add core_knn_diskann to the LIBS list, consistent with how other
test directories (tests/db/, tests/db/index/, tests/core/algorithm/diskann/)
handle DiskAnn linking.
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