Skip to content

Commit

Permalink
[Refactor] Rename config from tenann to vector_index
Browse files Browse the repository at this point in the history
Signed-off-by: leorishdu <[email protected]>
  • Loading branch information
dujijun007 committed Aug 6, 2024
1 parent 728f7f4 commit 78535ba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions be/src/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -1403,10 +1403,10 @@ CONF_mBool(lake_enable_alter_struct, "true");
// Enable caching index blocks for IVF-family vector indexes
CONF_mBool(enable_vector_index_block_cache, "true");

// concurrency of building tenann index
CONF_mInt32(config_tenann_build_concurrency, "8");
// concurrency of building index
CONF_mInt32(config_vector_index_build_concurrency, "8");

// default not to build the empty index
CONF_mInt32(config_tenann_default_build_threshold, "0");
CONF_mInt32(config_vector_index_default_build_threshold, "0");

} // namespace starrocks::config
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Status TenAnnIndexBuilderProxy::init() {
ASSIGN_OR_RETURN(auto meta, get_vector_meta(_tablet_index, std::map<std::string, std::string>{}))

RETURN_IF_ERROR(success_once(_init_once, []() {
tenann::OmpSetNumThreads(config::config_tenann_build_concurrency);
tenann::OmpSetNumThreads(config::config_vector_index_build_concurrency);
return Status::OK();
}).status());

Expand Down
2 changes: 1 addition & 1 deletion be/src/storage/index/vector/vector_index_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class VectorIndexWriter {
std::string _vector_index_file_path;
std::unique_ptr<VectorIndexBuilder> _index_builder;

uint32_t _start_vector_index_build_threshold = config::config_tenann_default_build_threshold;
uint32_t _start_vector_index_build_threshold = config::config_vector_index_default_build_threshold;

// buffer data for tiny data size
ColumnPtr _buffer_column;
Expand Down
2 changes: 1 addition & 1 deletion be/test/storage/index/vector_index_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ TEST_F(VectorIndexWriterTest, test_write_vector_index) {
}

TEST_F(VectorIndexWriterTest, testwrite_with_empty_mark) {
config::config_tenann_default_build_threshold = 100;
config::config_vector_index_default_build_threshold = 100;
auto tablet_index = prepare_tablet_index();

tablet_index->add_common_properties("index_type", "ivfpq");
Expand Down

0 comments on commit 78535ba

Please sign in to comment.