From 54246a562a3cfd9d54647fb650eea9bca58d012b Mon Sep 17 00:00:00 2001 From: meiravgri Date: Sun, 15 Feb 2026 15:48:14 +0000 Subject: [PATCH 1/2] Add throttle control callback signature for disk tiered index --- src/VecSim/vec_sim_common.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/VecSim/vec_sim_common.h b/src/VecSim/vec_sim_common.h index 9597c0489..b3d6833c7 100644 --- a/src/VecSim/vec_sim_common.h +++ b/src/VecSim/vec_sim_common.h @@ -135,6 +135,11 @@ typedef void (*JobCallback)(AsyncJob *); typedef int (*SubmitCB)(void *job_queue, void *index_ctx, AsyncJob **jobs, JobCallback *CBs, size_t jobs_len); +/** + * Callback signature for throttle control in disk tiered index. + */ +typedef void (*ThrottleCB)(void); + /** * @brief Index initialization parameters. * @@ -203,9 +208,9 @@ typedef struct { } TieredHNSWParams; // A struct that contains HNSW Disk tiered index specific params. -// Consider removing and use TieredHNSWParams instead if they both share swapJobThreshold typedef struct { - char _placeholder; // Reserved for future fields and avoid compiler errors + ThrottleCB enableThrottleCB; // call to enable postponing of Redis commands + ThrottleCB disableThrottleCB; // call to disable postponing of Redis commands } TieredHNSWDiskParams; // A struct that contains SVS tiered index specific params. From d671e69ccb9f2813fc8dd6b91c9a5ba7df7b7583 Mon Sep 17 00:00:00 2001 From: meiravgri Date: Sun, 15 Feb 2026 15:53:31 +0000 Subject: [PATCH 2/2] format --- src/VecSim/vec_sim_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/VecSim/vec_sim_common.h b/src/VecSim/vec_sim_common.h index b3d6833c7..993f46e9b 100644 --- a/src/VecSim/vec_sim_common.h +++ b/src/VecSim/vec_sim_common.h @@ -209,8 +209,8 @@ typedef struct { // A struct that contains HNSW Disk tiered index specific params. typedef struct { - ThrottleCB enableThrottleCB; // call to enable postponing of Redis commands - ThrottleCB disableThrottleCB; // call to disable postponing of Redis commands + ThrottleCB enableThrottleCB; // call to enable postponing of Redis commands + ThrottleCB disableThrottleCB; // call to disable postponing of Redis commands } TieredHNSWDiskParams; // A struct that contains SVS tiered index specific params.