Skip to content

Commit 03e02b1

Browse files
QuChen88murphyjacob4eifrah-aws
authored
Merge main into 1.0 (#147)
* Use background context rather than IO context during Aux save. (#143) Due to valkey-io/valkey#2125 the IO context will not be freed which can trigger later assertions. We don't rely on it during saving so instead we now just use the background context for things like logging. Signed-off-by: Jacob Murphy <jkmurphy@google.com> * Allow changing the reader/writer threads count at runtime (#129) With this PR, user can control the threads counts using: ``` config set search.reader-threads <value> config get search.reader-threads config set search.writer-threads <value> config get search.writer-threads ``` In addition, refactored the configuration registration mechanism. Calling `Builder<type>("my-config",...).Build()` will create an instance of configuration entry named `my-config` that can be controlled from the Valkey's `CONFIG SET|GET search.my-config` command AND from the command line by passing `--my-config ...` **Example 1:** In order to register a configuration entry with Valkey, named: `search.hnsw-block-size`, the developer needs to place similar lines of code in one of his source files: ```c++ // Include the vmsdk::config namespace #include "vmsdk/src/module_config.h" ... // Controls the HNSW resize increments namespace config = vmsdk::config; static auto hnsw_block_size = config::NumberBuilder("hnsw-block-size", // name kHNSWDefaultBlockSize, // default size kHNSWMinimumBlockSize, // min size UINT_MAX) // max size .WithValidationCallback(ValidateHNSWBlockSize) .Build(); // Define some boolean flag and initialize it with false // we can later change it using `config set search.my-bool-flag yes` auto my_bool_flag = config::BooleanBuilder("my-bool-flag", false).Build(); ``` With the above example, it is now also possible to pass these configuration from the command line like this: ```bash valkey-server "--loadmodule libsearch.so --my-bool-flag yes --hnsw-block-size 20480" ``` **Example 2:** We can also register a configuration entry with an action to take when the configuration item is modified: ```c++ // Include the vmsdk::config namespace #include "vmsdk/src/module_config.h" ... namespace config = vmsdk::config; // Controls the number of reader threads static auto reader_threads_count = config::NumberBuilder( kReaderThreadsConfig, // name kDefaultThreadsCount, // default size 1, // min size kMaxThreadsCount) // max size .WithModifyCallback( // set an "On-Modify" callback [](long long new_value) { UpdateThreadPoolCount( ValkeySearch::Instance().GetReaderThreadPool(), new_value); }) .Build(); ``` Note that the callback is called if you set it programmatically like this: ```c++ VMSDK_RETURN_IF_ERROR(reader_threads_count->SetValue(100)); ``` or using `valkey-cli`: ```bash config set search.reader-threads 100 ``` ![threads](https://github.com/user-attachments/assets/b47ad66f-a5ee-49ed-ac0f-9ff32397ce30) --------- Signed-off-by: Eran Ifrah <eifrah@amazon.com> * Dropped the deprecated `--threads` flag (#146) Use `--writer-threads` & `--reader-threads` flags instead Signed-off-by: Eran Ifrah <eifrah@amazon.com> --------- Signed-off-by: Jacob Murphy <jkmurphy@google.com> Signed-off-by: Eran Ifrah <eifrah@amazon.com> Co-authored-by: Jacob Murphy <jkmurphy@google.com> Co-authored-by: eifrah-aws <eifrah@amazon.com>
1 parent 54ab758 commit 03e02b1

23 files changed

Lines changed: 1369 additions & 203 deletions

src/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ set(SRCS_MODULE_LOADER ${CMAKE_CURRENT_LIST_DIR}/module_loader.cc)
88
# This is the module target
99
valkey_search_add_shared_library(libsearch ${SRCS_MODULE_LOADER})
1010
target_include_directories(libsearch PUBLIC ${CMAKE_CURRENT_LIST_DIR})
11-
target_link_options(libsearch PRIVATE "LINKER:--version-script=${CMAKE_SOURCE_DIR}/vmsdk/versionscript.lds")
11+
target_link_options(
12+
libsearch PRIVATE
13+
"LINKER:--version-script=${CMAKE_SOURCE_DIR}/vmsdk/versionscript.lds")
1214

1315
target_link_libraries(libsearch PUBLIC keyspace_event_manager)
1416
target_link_libraries(libsearch PUBLIC valkey_search)
@@ -20,7 +22,8 @@ target_link_libraries(libsearch PUBLIC server_events)
2022
list(APPEND THIRD_PARTY_LIBS coordinator_grpc_proto)
2123
list(APPEND THIRD_PARTY_LIBS coordinator_cc_proto)
2224

23-
valkey_search_create_proto_library("src/rdb_section.proto" "rdb_section_cc_proto")
25+
valkey_search_create_proto_library("src/rdb_section.proto"
26+
"rdb_section_cc_proto")
2427
target_link_libraries(rdb_section_cc_proto PUBLIC index_schema_cc_proto)
2528
target_link_libraries(rdb_section_cc_proto PUBLIC coordinator_cc_proto)
2629
message(STATUS "Created proto library rdb_section_cc_proto")
@@ -39,8 +42,11 @@ endif()
3942
# Append -Wl,--end-group as the LAST argument
4043
target_link_libraries(libsearch PRIVATE lib_to_add_end_group_flag)
4144

42-
set(SRCS_VALKEY_SEARCH ${CMAKE_CURRENT_LIST_DIR}/valkey_search.cc
43-
${CMAKE_CURRENT_LIST_DIR}/valkey_search.h)
45+
set(SRCS_VALKEY_SEARCH
46+
${CMAKE_CURRENT_LIST_DIR}/valkey_search.cc
47+
${CMAKE_CURRENT_LIST_DIR}/valkey_search.h
48+
${CMAKE_CURRENT_LIST_DIR}/valkey_search_options.cc
49+
${CMAKE_CURRENT_LIST_DIR}/valkey_search_options.h)
4450

4551
valkey_search_add_static_library(valkey_search "${SRCS_VALKEY_SEARCH}")
4652
target_include_directories(valkey_search PUBLIC ${CMAKE_CURRENT_LIST_DIR})

src/coordinator/metadata_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,13 @@ absl::Status MetadataManager::SaveMetadata(RedisModuleCtx *ctx, SafeRDB *rdb,
520520
if (!DoesGlobalMetadataContainEntry(metadata_.Get())) {
521521
// Auxsave2 will ensure nothing is written to the aux section if we write
522522
// nothing.
523-
VMSDK_LOG(NOTICE, detached_ctx_.get())
523+
VMSDK_LOG(NOTICE, ctx)
524524
<< "Skipping aux metadata for MetadataManager since there is no "
525525
"content";
526526
return absl::OkStatus();
527527
}
528528

529-
VMSDK_LOG(NOTICE, detached_ctx_.get())
529+
VMSDK_LOG(NOTICE, ctx)
530530
<< "Saving aux metadata for MetadataManager to aux RDB";
531531
data_model::RDBSection section;
532532
std::string serialized_metadata;

src/rdb_serialization.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include "absl/strings/string_view.h"
4141
#include "src/metrics.h"
4242
#include "src/rdb_section.pb.h"
43+
#include "src/valkey_search.h"
4344
#include "vmsdk/src/log.h"
4445
#include "vmsdk/src/managed_pointers.h"
4546
#include "vmsdk/src/status/status_macros.h"
@@ -282,8 +283,8 @@ absl::Status PerformRDBSave(RedisModuleCtx *ctx, SafeRDB *rdb, int when) {
282283
}
283284

284285
void AuxSaveCallback(RedisModuleIO *rdb, int when) {
285-
auto ctx = RedisModule_GetContextFromIO(rdb);
286286
SafeRDB safe_rdb(rdb);
287+
auto ctx = ValkeySearch::Instance().GetBackgroundCtx();
287288
auto result = PerformRDBSave(ctx, &safe_rdb, when);
288289
if (result.ok()) {
289290
Metrics::GetStats().rdb_save_success_cnt++;

src/schema_manager.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,13 +521,13 @@ absl::Status SchemaManager::SaveIndexes(RedisModuleCtx *ctx, SafeRDB *rdb,
521521
if (db_to_index_schemas_.empty()) {
522522
// Auxsave2 will ensure nothing is written to the aux section if we
523523
// write nothing.
524-
RedisModule_Log(detached_ctx_.get(), REDISMODULE_LOGLEVEL_NOTICE,
524+
RedisModule_Log(ctx, REDISMODULE_LOGLEVEL_NOTICE,
525525
"Skipping aux metadata for SchemaManager since there "
526526
"is no content");
527527
return absl::OkStatus();
528528
}
529529

530-
RedisModule_Log(detached_ctx_.get(), REDISMODULE_LOGLEVEL_NOTICE,
530+
RedisModule_Log(ctx, REDISMODULE_LOGLEVEL_NOTICE,
531531
"Saving aux metadata for SchemaManager to aux RDB");
532532
for (const auto &[db_num, inner_map] : db_to_index_schemas_) {
533533
for (const auto &[name, schema] : inner_map) {

src/valkey_search.cc

Lines changed: 56 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "src/valkey_search.h"
3131

3232
#include <algorithm>
33-
#include <atomic>
3433
#include <cstddef>
3534
#include <cstdint>
3635
#include <memory>
@@ -58,79 +57,25 @@
5857
#include "src/rdb_serialization.h"
5958
#include "src/schema_manager.h"
6059
#include "src/utils/string_interning.h"
60+
#include "src/valkey_search_options.h"
6161
#include "src/vector_externalizer.h"
62-
#include "vmsdk/src/command_parser.h"
63-
#include "vmsdk/src/concurrency.h"
6462
#include "vmsdk/src/latency_sampler.h"
6563
#include "vmsdk/src/log.h"
6664
#include "vmsdk/src/managed_pointers.h"
6765
#include "vmsdk/src/memory_allocation.h"
66+
#include "vmsdk/src/module_config.h"
6867
#include "vmsdk/src/status/status_macros.h"
6968
#include "vmsdk/src/thread_pool.h"
7069
#include "vmsdk/src/utils.h"
7170
#include "vmsdk/src/valkey_module_api/valkey_module.h"
7271

7372
namespace valkey_search {
7473

74+
using vmsdk::config::ModuleConfigManager;
75+
7576
static absl::NoDestructor<std::unique_ptr<ValkeySearch>> valkey_search_instance;
77+
7678
constexpr size_t kMaxWorkerThreadPoolSuspensionSec{60};
77-
static std::atomic<uint32_t> hnsw_block_size{10240};
78-
const absl::string_view kHNSWBlockSizeConfig{"hnsw-block-size"};
79-
80-
namespace options {
81-
82-
// Maintaining the parameter `--threads` for backward compatibility. Safe to
83-
// remove it post GA.
84-
constexpr absl::string_view kThreadsParam{"--threads"};
85-
constexpr absl::string_view kReaderThreadsParam{"--reader-threads"};
86-
constexpr absl::string_view kWriterThreadsParam{"--writer-threads"};
87-
constexpr absl::string_view kUseCoordinator{"--use-coordinator"};
88-
constexpr absl::string_view kLogLevel{"--log-level"};
89-
constexpr absl::string_view kHNSWBlockSize{"--hnsw-block-size"};
90-
91-
struct Parameters {
92-
size_t reader_threads{vmsdk::GetPhysicalCPUCoresCount()};
93-
size_t writer_threads{vmsdk::GetPhysicalCPUCoresCount()};
94-
std::optional<int> threads;
95-
bool use_coordinator{false};
96-
std::optional<std::string> log_level;
97-
uint32_t hnsw_block_size{10240};
98-
};
99-
100-
absl::StatusOr<Parameters> Load(RedisModuleString **argv, int argc) {
101-
Parameters parameters;
102-
vmsdk::KeyValueParser<Parameters> parser;
103-
parser.AddParamParser(kReaderThreadsParam,
104-
GENERATE_VALUE_PARSER(Parameters, reader_threads));
105-
parser.AddParamParser(kWriterThreadsParam,
106-
GENERATE_VALUE_PARSER(Parameters, writer_threads));
107-
parser.AddParamParser(kThreadsParam,
108-
GENERATE_VALUE_PARSER(Parameters, threads));
109-
parser.AddParamParser(kUseCoordinator,
110-
GENERATE_FLAG_PARSER(Parameters, use_coordinator));
111-
parser.AddParamParser(kLogLevel,
112-
GENERATE_VALUE_PARSER(Parameters, log_level));
113-
parser.AddParamParser(kHNSWBlockSize,
114-
GENERATE_VALUE_PARSER(Parameters, hnsw_block_size));
115-
vmsdk::ArgsIterator itr{argv, argc};
116-
VMSDK_RETURN_IF_ERROR(parser.Parse(parameters, itr));
117-
if (parameters.threads.has_value()) {
118-
parameters.reader_threads = std::max(1, parameters.threads.value());
119-
parameters.writer_threads =
120-
std::max(1, static_cast<int>(parameters.threads.value() * 2.5));
121-
}
122-
if ((parameters.reader_threads == 0 && parameters.writer_threads != 0) ||
123-
(parameters.reader_threads != 0 && parameters.writer_threads == 0)) {
124-
return absl::InvalidArgumentError(
125-
"Maintaining query integrity is only supported when both the reader "
126-
"and writer thread pools are either enabled or disabled "
127-
"simultaneously");
128-
}
129-
VMSDK_LOG(NOTICE, nullptr) << "reader_threads: " << parameters.reader_threads;
130-
VMSDK_LOG(NOTICE, nullptr) << "writer_threads: " << parameters.writer_threads;
131-
return parameters;
132-
}
133-
} // namespace options
13479

13580
size_t ValkeySearch::GetMaxWorkerThreadPoolSuspensionSec() const {
13681
return kMaxWorkerThreadPoolSuspensionSec;
@@ -143,7 +88,11 @@ void ValkeySearch::InitInstance(std::unique_ptr<ValkeySearch> instance) {
14388
}
14489

14590
uint32_t ValkeySearch::GetHNSWBlockSize() const {
146-
return hnsw_block_size.load(std::memory_order_relaxed);
91+
return options::GetHNSWBlockSize().GetValue();
92+
}
93+
94+
void ValkeySearch::SetHNSWBlockSize(uint32_t block_size) {
95+
options::GetHNSWBlockSize().SetValueOrLog(block_size, WARNING);
14796
}
14897

14998
static std::string ConvertToMB(double bytes_value) {
@@ -439,6 +388,13 @@ void ValkeySearch::OnServerCronCallback(RedisModuleCtx *ctx,
439388
[[maybe_unused]] RedisModuleEvent eid,
440389
[[maybe_unused]] uint64_t subevent,
441390
[[maybe_unused]] void *data) {
391+
// Clean-up after threads that exited without being "joined"
392+
if (writer_thread_pool_) {
393+
writer_thread_pool_->JoinTerminatedWorkers();
394+
}
395+
if (reader_thread_pool_) {
396+
reader_thread_pool_->JoinTerminatedWorkers();
397+
}
442398
// Resume worker thread pool if suspension time exceeds the max allowed
443399
// duration
444400
if (writer_thread_pool_suspend_watch_.has_value() &&
@@ -482,36 +438,24 @@ absl::StatusOr<int> GetRedisLocalPort(RedisModuleCtx *ctx) {
482438
return port;
483439
}
484440

485-
absl::Status ValkeySearch::LoadOptions(RedisModuleCtx *ctx,
486-
RedisModuleString **argv, int argc) {
487-
VMSDK_ASSIGN_OR_RETURN(auto options, options::Load(argv, argc));
441+
absl::Status ValkeySearch::Startup(RedisModuleCtx *ctx) {
488442
reader_thread_pool_ = std::make_unique<vmsdk::ThreadPool>(
489-
"read-worker-", options.reader_threads);
443+
"read-worker-", options::GetReaderThreadCount().GetValue());
490444
reader_thread_pool_->StartWorkers();
491445
writer_thread_pool_ = std::make_unique<vmsdk::ThreadPool>(
492-
"write-worker-", options.writer_threads);
446+
"write-worker-", options::GetWriterThreadCount().GetValue());
493447
writer_thread_pool_->StartWorkers();
494448

495-
if (options.hnsw_block_size) {
496-
RedisModuleString *err = nullptr;
497-
if (BlockSizeSetConfig(kHNSWBlockSizeConfig.data(), options.hnsw_block_size,
498-
nullptr, &err) != REDISMODULE_OK) {
499-
std::string error_msg =
500-
err ? RedisModule_StringPtrLen(err, nullptr) : "Unknown error";
501-
RedisModule_FreeString(nullptr, err);
502-
return absl::InternalError(absl::StrFormat(
503-
"Failed to set vs-hnsw-block-size config from command-line: %s",
504-
error_msg));
505-
}
506-
}
449+
VMSDK_LOG(NOTICE, ctx) << "use_coordinator: "
450+
<< options::GetUseCoordinator().GetValue()
451+
<< ", IsCluster: " << IsCluster();
507452

508-
if (options.log_level) {
509-
VMSDK_RETURN_IF_ERROR(vmsdk::InitLogging(ctx, options.log_level));
510-
}
511-
VMSDK_LOG(NOTICE, ctx) << "options.use_coordinator: "
512-
<< options.use_coordinator
513-
<< " IsCluster: " << IsCluster();
514-
if (options.use_coordinator && IsCluster()) {
453+
VMSDK_LOG(NOTICE, ctx) << "Reader workers count: "
454+
<< reader_thread_pool_->Size();
455+
VMSDK_LOG(NOTICE, ctx) << "Writer workers count: "
456+
<< writer_thread_pool_->Size();
457+
458+
if (options::GetUseCoordinator().GetValue() && IsCluster()) {
515459
client_pool_ = std::make_unique<coordinator::ClientPool>(
516460
vmsdk::MakeUniqueRedisDetachedThreadSafeContext(ctx));
517461
coordinator::MetadataManager::InitInstance(
@@ -520,8 +464,8 @@ absl::Status ValkeySearch::LoadOptions(RedisModuleCtx *ctx,
520464
}
521465
SchemaManager::InitInstance(std::make_unique<SchemaManager>(
522466
ctx, server_events::SubscribeToServerEvents, writer_thread_pool_.get(),
523-
options.use_coordinator && IsCluster()));
524-
if (options.use_coordinator) {
467+
options::GetUseCoordinator().GetValue() && IsCluster()));
468+
if (options::GetUseCoordinator().GetValue()) {
525469
VMSDK_ASSIGN_OR_RETURN(auto redis_port, GetRedisLocalPort(ctx));
526470
auto coordinator_port = coordinator::GetCoordinatorPort(redis_port);
527471
coordinator_ = coordinator::ServerImpl::Create(
@@ -556,58 +500,24 @@ void ValkeySearch::ResumeWriterThreadPool(RedisModuleCtx *ctx,
556500
writer_thread_pool_suspend_watch_ = std::nullopt;
557501
}
558502

559-
long long ValkeySearch::BlockSizeGetConfig(
560-
[[maybe_unused]] const char *config_name,
561-
[[maybe_unused]] void *priv_data) {
562-
return hnsw_block_size.load(std::memory_order_relaxed);
563-
}
564-
565-
int ValkeySearch::BlockSizeSetConfig([[maybe_unused]] const char *config_name,
566-
long long value,
567-
[[maybe_unused]] void *priv_data,
568-
RedisModuleString **err) {
569-
if (value <= 0 || value > UINT32_MAX) {
570-
if (err) {
571-
*err = RedisModule_CreateStringPrintf(
572-
nullptr, "Block size must be between 10240 and %u", UINT32_MAX);
573-
}
574-
return REDISMODULE_ERR;
575-
}
576-
hnsw_block_size.store(static_cast<uint32_t>(value),
577-
std::memory_order_relaxed);
578-
return REDISMODULE_OK;
579-
}
580-
581503
absl::Status ValkeySearch::OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv,
582504
int argc) {
583505
ctx_ = RedisModule_GetDetachedThreadSafeContext(ctx);
584506

585507
// Register a single module type for Aux load/save callbacks.
586508
VMSDK_RETURN_IF_ERROR(RegisterModuleType(ctx));
587509

588-
// Register vs-block-size configuration
589-
if (RedisModule_RegisterNumericConfig(
590-
ctx,
591-
kHNSWBlockSizeConfig.data(), // Name
592-
10240, // Default value
593-
REDISMODULE_CONFIG_DEFAULT, // Flags (mutable, can be changed via
594-
// CONFIG SET)
595-
10240, // Minimum value
596-
UINT32_MAX, // Maximum value
597-
BlockSizeGetConfig, // Get callback
598-
BlockSizeSetConfig, // Set callback
599-
nullptr, // Apply callback (optional)
600-
nullptr // privdata (not used here)
601-
) != REDISMODULE_OK) {
602-
return absl::InternalError("Failed to register vs-block-size config");
603-
}
510+
// Register all global configuration variables
511+
VMSDK_RETURN_IF_ERROR(ModuleConfigManager::Instance().Init(ctx));
604512

605513
// Load configurations to initialize registered configs
606514
if (RedisModule_LoadConfigs(ctx) != REDISMODULE_OK) {
607515
return absl::InternalError("Failed to load configurations");
608516
}
609517

610-
VMSDK_RETURN_IF_ERROR(LoadOptions(ctx, argv, argc));
518+
// Apply command line arguments and initialize the module
519+
VMSDK_RETURN_IF_ERROR(LoadAndParseArgv(ctx, argv, argc));
520+
VMSDK_RETURN_IF_ERROR(Startup(ctx));
611521

612522
RedisModule_SetModuleOptions(
613523
ctx, REDISMODULE_OPTIONS_HANDLE_IO_ERRORS |
@@ -617,6 +527,26 @@ absl::Status ValkeySearch::OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv,
617527
<< (IsJsonModuleLoaded(ctx) ? "" : "not ")
618528
<< "loaded!";
619529
VectorExternalizer::Instance().Init(ctx_);
530+
VMSDK_LOG(DEBUG, ctx) << "Search module completed initialization!";
531+
return absl::OkStatus();
532+
}
533+
534+
absl::Status ValkeySearch::LoadAndParseArgv(RedisModuleCtx *ctx,
535+
RedisModuleString **argv,
536+
int argc) {
537+
VMSDK_RETURN_IF_ERROR(
538+
vmsdk::config::ModuleConfigManager::Instance().ParseAndLoadArgv(ctx, argv,
539+
argc));
540+
// Sanity check
541+
if ((options::GetReaderThreadCount().GetValue() == 0 &&
542+
options::GetWriterThreadCount().GetValue() != 0) ||
543+
(options::GetWriterThreadCount().GetValue() == 0 &&
544+
options::GetReaderThreadCount().GetValue() != 0)) {
545+
return absl::InvalidArgumentError(
546+
"Maintaining query integrity is only supported when both the reader "
547+
"and writer thread pools are either enabled or disabled "
548+
"simultaneously");
549+
}
620550
return absl::OkStatus();
621551
}
622552

src/valkey_search.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ class ValkeySearch {
7070
}
7171
void Info(RedisModuleInfoCtx *ctx, bool for_crash_report) const;
7272

73-
static long long BlockSizeGetConfig([[maybe_unused]] const char *config_name,
74-
[[maybe_unused]] void *priv_data);
75-
static int BlockSizeSetConfig([[maybe_unused]] const char *config_name,
76-
long long value,
77-
[[maybe_unused]] void *priv_data,
78-
[[maybe_unused]] RedisModuleString **err);
79-
8073
IndexSchema::Stats::ResultCnt<uint64_t> AccumulateIndexSchemaResults(
8174
absl::AnyInvocable<const IndexSchema::Stats::ResultCnt<
8275
std::atomic<uint64_t>> &(const IndexSchema::Stats &) const>
@@ -93,7 +86,9 @@ class ValkeySearch {
9386
void AfterForkParent();
9487
static ValkeySearch &Instance();
9588
static void InitInstance(std::unique_ptr<ValkeySearch> instance);
89+
9690
uint32_t GetHNSWBlockSize() const;
91+
void SetHNSWBlockSize(uint32_t block_size);
9792

9893
absl::Status OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc);
9994
void OnUnload(RedisModuleCtx *ctx);
@@ -129,8 +124,10 @@ class ValkeySearch {
129124
virtual size_t GetMaxWorkerThreadPoolSuspensionSec() const;
130125

131126
private:
132-
absl::Status LoadOptions(RedisModuleCtx *ctx, RedisModuleString **argv,
133-
int argc);
127+
absl::Status Startup(RedisModuleCtx *ctx);
128+
absl::Status LoadAndParseArgv(RedisModuleCtx *ctx, RedisModuleString **argv,
129+
int argc);
130+
134131
static void *RDBLoad(RedisModuleIO *rdb, int encoding_version);
135132
static void FreeIndexSchema(void *value);
136133
static bool IsChildProcess();

0 commit comments

Comments
 (0)