Skip to content

SVS Shared Thread Pool Refactor (MOD-9881)#925

Open
meiravgri wants to merge 2 commits intomainfrom
meiravg_adjustable_thpool
Open

SVS Shared Thread Pool Refactor (MOD-9881)#925
meiravgri wants to merge 2 commits intomainfrom
meiravg_adjustable_thpool

Conversation

@meiravgri
Copy link
Copy Markdown
Collaborator

@meiravgri meiravgri commented Mar 31, 2026

Step 1: Rename SVS thread pool internal methods to match shared pool terminology
Rename setNumThreads/getNumThreadssetParallelism/getParallelism and getThreadPoolCapacitygetPoolSize across VectorSimilarity. Public info API fields (numThreads, lastReservedThreads, NUM_THREADS, LAST_RESERVED_NUM_THREADS) remain unchanged. No behavioral changes.

Describe the changes in the pull request

A clear and concise description of what the PR is solving.

Which issues this PR fixes

  1. #...
  2. MOD...

Main objects this PR modified

  1. ...
  2. ...

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Note

Medium Risk
Mostly mechanical renaming of SVS threadpool controls, but it touches concurrency-related code paths and introduces a new public C API (VecSim_UpdateThreadPoolSize) that changes global write mode behavior.

Overview
Refactors SVS thread-management terminology by renaming internal threadpool controls from *NumThreads/*ThreadPoolCapacity to *Parallelism/*PoolSize across SVS and tiered-SVS code, while keeping the external debug/info fields (numThreads, lastReservedThreads) unchanged.

Adds scaffolding for a shared SVS thread pool: SVSIndexBase::getSharedThreadPool() singleton accessor and a new public C API VecSim_UpdateThreadPoolSize() (currently only toggles async vs in-place write mode, with a TODO to create/resize the shared pool). Tests/benchmarks are updated to use the new method names.

Written by Cursor Bugbot for commit c488bf0. This will update automatically on new commits. Configure here.

…l terminology**

Rename `setNumThreads`/`getNumThreads` → `setParallelism`/`getParallelism` and `getThreadPoolCapacity` → `getPoolSize` across VectorSimilarity. Public info API fields (`numThreads`, `lastReservedThreads`, `NUM_THREADS`, `LAST_RESERVED_NUM_THREADS`) remain unchanged. No behavioral changes.
@jit-ci
Copy link
Copy Markdown

jit-ci bot commented Mar 31, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.93%. Comparing base (f177c40) to head (c488bf0).

Files with missing lines Patch % Lines
src/VecSim/vec_sim.cpp 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #925      +/-   ##
==========================================
- Coverage   96.98%   96.93%   -0.06%     
==========================================
  Files         129      129              
  Lines        7574     7578       +4     
==========================================
  Hits         7346     7346              
- Misses        228      232       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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