mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 10:08:42 +08:00
Format code
Former-commit-id: 052c197f7678f5828580487fb98ab978659c59bf
This commit is contained in:
parent
cfb2d99648
commit
3d21f05f7d
@ -292,7 +292,8 @@ DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) {
|
|||||||
std::vector<int> file_types;
|
std::vector<int> file_types;
|
||||||
if (index.engine_type_ == static_cast<int32_t>(EngineType::FAISS_IDMAP)) {
|
if (index.engine_type_ == static_cast<int32_t>(EngineType::FAISS_IDMAP)) {
|
||||||
file_types = {
|
file_types = {
|
||||||
static_cast<int32_t>(meta::TableFileSchema::NEW), static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE),
|
static_cast<int32_t>(meta::TableFileSchema::NEW),
|
||||||
|
static_cast<int32_t>(meta::TableFileSchema::NEW_MERGE),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
file_types = {
|
file_types = {
|
||||||
|
|||||||
@ -55,9 +55,9 @@ MemTableFile::CreateTableFile() {
|
|||||||
Status
|
Status
|
||||||
MemTableFile::Add(const VectorSourcePtr& source, IDNumbers& vector_ids) {
|
MemTableFile::Add(const VectorSourcePtr& source, IDNumbers& vector_ids) {
|
||||||
if (table_file_schema_.dimension_ <= 0) {
|
if (table_file_schema_.dimension_ <= 0) {
|
||||||
std::string err_msg = "MemTableFile::Add: table_file_schema dimension = " +
|
std::string err_msg =
|
||||||
std::to_string(table_file_schema_.dimension_) + ", table_id = " +
|
"MemTableFile::Add: table_file_schema dimension = " + std::to_string(table_file_schema_.dimension_) +
|
||||||
table_file_schema_.table_id_;
|
", table_id = " + table_file_schema_.table_id_;
|
||||||
ENGINE_LOG_ERROR << err_msg;
|
ENGINE_LOG_ERROR << err_msg;
|
||||||
return Status(DB_ERROR, "Not able to create table file");
|
return Status(DB_ERROR, "Not able to create table file");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -148,14 +148,17 @@ static const MetaSchema TABLES_SCHEMA(META_TABLES, {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// TableFiles schema
|
// TableFiles schema
|
||||||
static const MetaSchema TABLEFILES_SCHEMA(
|
static const MetaSchema TABLEFILES_SCHEMA(META_TABLEFILES, {
|
||||||
META_TABLEFILES,
|
MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"),
|
||||||
{
|
MetaField("table_id", "VARCHAR(255)", "NOT NULL"),
|
||||||
MetaField("id", "BIGINT", "PRIMARY KEY AUTO_INCREMENT"), MetaField("table_id", "VARCHAR(255)", "NOT NULL"),
|
MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"),
|
||||||
MetaField("engine_type", "INT", "DEFAULT 1 NOT NULL"), MetaField("file_id", "VARCHAR(255)", "NOT NULL"),
|
MetaField("file_id", "VARCHAR(255)", "NOT NULL"),
|
||||||
MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"), MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"),
|
MetaField("file_type", "INT", "DEFAULT 0 NOT NULL"),
|
||||||
MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"), MetaField("updated_time", "BIGINT", "NOT NULL"),
|
MetaField("file_size", "BIGINT", "DEFAULT 0 NOT NULL"),
|
||||||
MetaField("created_on", "BIGINT", "NOT NULL"), MetaField("date", "INT", "DEFAULT -1 NOT NULL"),
|
MetaField("row_count", "BIGINT", "DEFAULT 0 NOT NULL"),
|
||||||
|
MetaField("updated_time", "BIGINT", "NOT NULL"),
|
||||||
|
MetaField("created_on", "BIGINT", "NOT NULL"),
|
||||||
|
MetaField("date", "INT", "DEFAULT -1 NOT NULL"),
|
||||||
});
|
});
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@ -151,7 +151,8 @@ class IVFTest : public DataGen, public TestWithParam<::std::tuple<std::string, P
|
|||||||
knowhere::IVFIndexPtr index_ = nullptr;
|
knowhere::IVFIndexPtr index_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
INSTANTIATE_TEST_CASE_P(IVFParameters, IVFTest, Values(std::make_tuple("IVF", ParameterType::ivf),
|
INSTANTIATE_TEST_CASE_P(IVFParameters, IVFTest,
|
||||||
|
Values(std::make_tuple("IVF", ParameterType::ivf),
|
||||||
std::make_tuple("GPUIVF", ParameterType::ivf),
|
std::make_tuple("GPUIVF", ParameterType::ivf),
|
||||||
std::make_tuple("IVFPQ", ParameterType::ivfpq),
|
std::make_tuple("IVFPQ", ParameterType::ivfpq),
|
||||||
std::make_tuple("GPUIVFPQ", ParameterType::ivfpq),
|
std::make_tuple("GPUIVFPQ", ParameterType::ivfpq),
|
||||||
|
|||||||
@ -88,8 +88,8 @@ XBuildIndexTask::Load(milvus::scheduler::LoadType type, uint8_t device_id) {
|
|||||||
|
|
||||||
size_t file_size = to_index_engine_->PhysicalSize();
|
size_t file_size = to_index_engine_->PhysicalSize();
|
||||||
|
|
||||||
std::string info = "Load file id:" + std::to_string(file_->id_) + " file type:" +
|
std::string info = "Load file id:" + std::to_string(file_->id_) +
|
||||||
std::to_string(file_->file_type_) + " size:" + std::to_string(file_size) +
|
" file type:" + std::to_string(file_->file_type_) + " size:" + std::to_string(file_size) +
|
||||||
" bytes from location: " + file_->location_ + " totally cost";
|
" bytes from location: " + file_->location_ + " totally cost";
|
||||||
double span = rc.ElapseFromBegin(info);
|
double span = rc.ElapseFromBegin(info);
|
||||||
|
|
||||||
|
|||||||
@ -160,8 +160,8 @@ XSearchTask::Load(LoadType type, uint8_t device_id) {
|
|||||||
|
|
||||||
size_t file_size = index_engine_->PhysicalSize();
|
size_t file_size = index_engine_->PhysicalSize();
|
||||||
|
|
||||||
std::string info = "Load file id:" + std::to_string(file_->id_) + " file type:" +
|
std::string info = "Load file id:" + std::to_string(file_->id_) +
|
||||||
std::to_string(file_->file_type_) + " size:" + std::to_string(file_size) +
|
" file type:" + std::to_string(file_->file_type_) + " size:" + std::to_string(file_size) +
|
||||||
" bytes from location: " + file_->location_ + " totally cost";
|
" bytes from location: " + file_->location_ + " totally cost";
|
||||||
double span = rc.ElapseFromBegin(info);
|
double span = rc.ElapseFromBegin(info);
|
||||||
// for (auto &context : search_contexts_) {
|
// for (auto &context : search_contexts_) {
|
||||||
|
|||||||
@ -511,8 +511,8 @@ InsertTask::OnExecute() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// step 6: update table flag
|
// step 6: update table flag
|
||||||
user_provide_ids ? table_info.flag_ |= engine::meta::FLAG_MASK_HAS_USERID : table_info.flag_ |=
|
user_provide_ids ? table_info.flag_ |= engine::meta::FLAG_MASK_HAS_USERID
|
||||||
engine::meta::FLAG_MASK_NO_USERID;
|
: table_info.flag_ |= engine::meta::FLAG_MASK_NO_USERID;
|
||||||
status = DBWrapper::DB()->UpdateTableFlag(insert_param_->table_name(), table_info.flag_);
|
status = DBWrapper::DB()->UpdateTableFlag(insert_param_->table_name(), table_info.flag_);
|
||||||
|
|
||||||
#ifdef MILVUS_ENABLE_PROFILING
|
#ifdef MILVUS_ENABLE_PROFILING
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user