Skip to content

Refactor compaction for concurrent index - #487

Open
razdoburdin wants to merge 7 commits into
mainfrom
dev/razdoburdin/compaction
Open

razdoburdin wants to merge 7 commits into
mainfrom
dev/razdoburdin/compaction

Conversation

@razdoburdin

@razdoburdin razdoburdin commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The goal of this PR is reduction of compaction time for concurrent::MutableVamanaIndex.
Two approaches are applied:

  1. adds a new method repair_incomming_connections to concurrent::MutableVamanaIndex and related orchestrators. The method takes a pointer to a response structure with internal ids and do consolidation (reparent of incoming connections) if the vector is soft-deleted (no-op for all other vectors). delete_entries now takes an optional pointer to a response structure, if the pointer isn't null it writes internal ids of the newly soft-deleted slots and compaction epoch.
  2. Compact() method now swaps Empty slot with the last element in index, so number of copies is min(n_empty, n_non_empty).

C-API changes:

  1. svs_index_dynamic_mark_points_deleted takes the svs_task_h* follow_up as parameter, allocate memory for it and write all required data, so follow_up task structure has all required information to finalize deletion.
  2. svs_execute_task takes the svs_task_h task and execute it.
  3. svs_task_free frees the tasks's memory.

This branch has not been deployed

No deployments
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.

1 participant