#908 move primary_path and secondary_path to storage config (#909)

pull/915/head^2
Cai Yudong 2020-01-04 15:44:46 +08:00 committed by Jin Hai
parent b9d9b8ecc2
commit 28da6c73d0
13 changed files with 121 additions and 115 deletions

View File

@ -26,6 +26,7 @@ Please mark all change in change log and use the issue from GitHub
- \#791 - Remove Arrow
- \#834 - add cpu mode for built-in Faiss
- \#848 - Add ready-to-use config files to the Milvus repo for enhanced user experince
- \#908 - Move "primary_path" and "secondary_path" to storage config
## Task

View File

@ -38,12 +38,6 @@ server_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# DataBase Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# backend_url | URL for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ |
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
# | Format: dialect://username:password@host:port/database | | |
@ -59,8 +53,6 @@ server_config:
# | '*' means preload all existing tables. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
db_config:
primary_path: /var/lib/milvus
secondary_path:
backend_url: sqlite://:@:/
insert_buffer_size: 1
preload_table:
@ -68,6 +60,12 @@ db_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# Storage Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | String | 127.0.0.1 |
@ -81,6 +79,8 @@ db_config:
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: /var/lib/milvus
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000

View File

@ -38,12 +38,6 @@ server_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# DataBase Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# backend_url | URL for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ |
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
# | Format: dialect://username:password@host:port/database | | |
@ -59,8 +53,6 @@ server_config:
# | '*' means preload all existing tables. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
db_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
backend_url: sqlite://:@:/
insert_buffer_size: 1
preload_table:
@ -68,6 +60,12 @@ db_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# Storage Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | String | 127.0.0.1 |
@ -81,6 +79,8 @@ db_config:
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000

View File

@ -38,12 +38,6 @@ server_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# DataBase Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# backend_url | URL for metadata storage, using SQLite (for single server | URL | sqlite://:@:/ |
# | Milvus) or MySQL (for distributed cluster Milvus). | | |
# | Format: dialect://username:password@host:port/database | | |
@ -59,8 +53,6 @@ server_config:
# | '*' means preload all existing tables. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
db_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
backend_url: sqlite://:@:/
insert_buffer_size: 1
preload_table:
@ -68,6 +60,12 @@ db_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# Storage Config | Description | Type | Default |
#----------------------+------------------------------------------------------------+------------+-----------------+
# primary_path | Primary directory used to save meta data, vector data and | Path | /var/lib/milvus |
# | index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# secondary_path | A semicolon-separated list of secondary directories used | Path | |
# | to save vector data and index data. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_enable | Enable MinIO storage or not. | Boolean | false |
#----------------------+------------------------------------------------------------+------------+-----------------+
# minio_address | MinIO storage service IP address. | String | 127.0.0.1 |
@ -81,6 +79,8 @@ db_config:
# minio_bucket | MinIO storage service bucket name. | String | milvus-bucket |
#----------------------+------------------------------------------------------------+------------+-----------------+
storage_config:
primary_path: @MILVUS_DB_PATH@
secondary_path:
minio_enable: false
minio_address: 127.0.0.1
minio_port: 9000

View File

@ -89,12 +89,6 @@ Config::ValidateConfig() {
CONFIG_CHECK(GetServerConfigTimeZone(server_time_zone));
/* db config */
std::string db_primary_path;
CONFIG_CHECK(GetDBConfigPrimaryPath(db_primary_path));
std::string db_secondary_path;
CONFIG_CHECK(GetDBConfigSecondaryPath(db_secondary_path));
std::string db_backend_url;
CONFIG_CHECK(GetDBConfigBackendUrl(db_backend_url));
@ -108,6 +102,12 @@ Config::ValidateConfig() {
CONFIG_CHECK(GetDBConfigInsertBufferSize(db_insert_buffer_size));
/* storage config */
std::string storage_primary_path;
CONFIG_CHECK(GetStorageConfigPrimaryPath(storage_primary_path));
std::string storage_secondary_path;
CONFIG_CHECK(GetStorageConfigSecondaryPath(storage_secondary_path));
bool storage_minio_enable;
CONFIG_CHECK(GetStorageConfigMinioEnable(storage_minio_enable));
std::cout << "MinIO " << (storage_minio_enable ? "ENABLED !" : "DISABLED !") << std::endl;
@ -196,14 +196,14 @@ Config::ResetDefaultConfig() {
CONFIG_CHECK(SetServerConfigTimeZone(CONFIG_SERVER_TIME_ZONE_DEFAULT));
/* db config */
CONFIG_CHECK(SetDBConfigPrimaryPath(CONFIG_DB_PRIMARY_PATH_DEFAULT));
CONFIG_CHECK(SetDBConfigSecondaryPath(CONFIG_DB_SECONDARY_PATH_DEFAULT));
CONFIG_CHECK(SetDBConfigBackendUrl(CONFIG_DB_BACKEND_URL_DEFAULT));
CONFIG_CHECK(SetDBConfigArchiveDiskThreshold(CONFIG_DB_ARCHIVE_DISK_THRESHOLD_DEFAULT));
CONFIG_CHECK(SetDBConfigArchiveDaysThreshold(CONFIG_DB_ARCHIVE_DAYS_THRESHOLD_DEFAULT));
CONFIG_CHECK(SetDBConfigInsertBufferSize(CONFIG_DB_INSERT_BUFFER_SIZE_DEFAULT));
/* storage config */
CONFIG_CHECK(SetStorageConfigPrimaryPath(CONFIG_STORAGE_PRIMARY_PATH_DEFAULT));
CONFIG_CHECK(SetStorageConfigSecondaryPath(CONFIG_STORAGE_SECONDARY_PATH_DEFAULT));
CONFIG_CHECK(SetStorageConfigMinioEnable(CONFIG_STORAGE_MINIO_ENABLE_DEFAULT));
CONFIG_CHECK(SetStorageConfigMinioAddress(CONFIG_STORAGE_MINIO_ADDRESS_DEFAULT));
CONFIG_CHECK(SetStorageConfigMinioPort(CONFIG_STORAGE_MINIO_PORT_DEFAULT));
@ -405,19 +405,6 @@ Config::CheckServerConfigTimeZone(const std::string& value) {
}
/* DB config */
Status
Config::CheckDBConfigPrimaryPath(const std::string& value) {
if (value.empty()) {
return Status(SERVER_INVALID_ARGUMENT, "db_config.db_path is empty.");
}
return Status::OK();
}
Status
Config::CheckDBConfigSecondaryPath(const std::string& value) {
return Status::OK();
}
Status
Config::CheckDBConfigBackendUrl(const std::string& value) {
if (!ValidationUtil::ValidateDbURI(value).ok()) {
@ -475,6 +462,19 @@ Config::CheckDBConfigInsertBufferSize(const std::string& value) {
}
/* storage config */
Status
Config::CheckStorageConfigPrimaryPath(const std::string& value) {
if (value.empty()) {
return Status(SERVER_INVALID_ARGUMENT, "storage_config.db_path is empty.");
}
return Status::OK();
}
Status
Config::CheckStorageConfigSecondaryPath(const std::string& value) {
return Status::OK();
}
Status
Config::CheckStorageConfigMinioEnable(const std::string& value) {
if (!ValidationUtil::ValidateStringIsBool(value).ok()) {
@ -893,18 +893,6 @@ Config::GetServerConfigTimeZone(std::string& value) {
}
/* DB config */
Status
Config::GetDBConfigPrimaryPath(std::string& value) {
value = GetConfigStr(CONFIG_DB, CONFIG_DB_PRIMARY_PATH, CONFIG_DB_PRIMARY_PATH_DEFAULT);
return CheckDBConfigPrimaryPath(value);
}
Status
Config::GetDBConfigSecondaryPath(std::string& value) {
value = GetConfigStr(CONFIG_DB, CONFIG_DB_SECONDARY_PATH, CONFIG_DB_SECONDARY_PATH_DEFAULT);
return Status::OK();
}
Status
Config::GetDBConfigBackendUrl(std::string& value) {
value = GetConfigStr(CONFIG_DB, CONFIG_DB_BACKEND_URL, CONFIG_DB_BACKEND_URL_DEFAULT);
@ -944,6 +932,18 @@ Config::GetDBConfigPreloadTable(std::string& value) {
}
/* storage config */
Status
Config::GetStorageConfigPrimaryPath(std::string& value) {
value = GetConfigStr(CONFIG_DB, CONFIG_STORAGE_PRIMARY_PATH, CONFIG_STORAGE_PRIMARY_PATH_DEFAULT);
return CheckStorageConfigPrimaryPath(value);
}
Status
Config::GetStorageConfigSecondaryPath(std::string& value) {
value = GetConfigStr(CONFIG_DB, CONFIG_STORAGE_SECONDARY_PATH, CONFIG_STORAGE_SECONDARY_PATH_DEFAULT);
return CheckStorageConfigSecondaryPath(value);
}
Status
Config::GetStorageConfigMinioEnable(bool& value) {
std::string str = GetConfigStr(CONFIG_STORAGE, CONFIG_STORAGE_MINIO_ENABLE, CONFIG_STORAGE_MINIO_ENABLE_DEFAULT);
@ -1186,18 +1186,6 @@ Config::SetServerConfigTimeZone(const std::string& value) {
}
/* db config */
Status
Config::SetDBConfigPrimaryPath(const std::string& value) {
CONFIG_CHECK(CheckDBConfigPrimaryPath(value));
return SetConfigValueInMem(CONFIG_DB, CONFIG_DB_PRIMARY_PATH, value);
}
Status
Config::SetDBConfigSecondaryPath(const std::string& value) {
CONFIG_CHECK(CheckDBConfigSecondaryPath(value));
return SetConfigValueInMem(CONFIG_DB, CONFIG_DB_SECONDARY_PATH, value);
}
Status
Config::SetDBConfigBackendUrl(const std::string& value) {
CONFIG_CHECK(CheckDBConfigBackendUrl(value));
@ -1223,6 +1211,18 @@ Config::SetDBConfigInsertBufferSize(const std::string& value) {
}
/* storage config */
Status
Config::SetStorageConfigPrimaryPath(const std::string& value) {
CONFIG_CHECK(CheckStorageConfigPrimaryPath(value));
return SetConfigValueInMem(CONFIG_DB, CONFIG_STORAGE_PRIMARY_PATH, value);
}
Status
Config::SetStorageConfigSecondaryPath(const std::string& value) {
CONFIG_CHECK(CheckStorageConfigSecondaryPath(value));
return SetConfigValueInMem(CONFIG_DB, CONFIG_STORAGE_SECONDARY_PATH, value);
}
Status
Config::SetStorageConfigMinioEnable(const std::string& value) {
CONFIG_CHECK(CheckStorageConfigMinioEnable(value));

View File

@ -52,10 +52,6 @@ static const char* CONFIG_SERVER_TIME_ZONE_DEFAULT = "UTC+8";
/* db config */
static const char* CONFIG_DB = "db_config";
static const char* CONFIG_DB_PRIMARY_PATH = "primary_path";
static const char* CONFIG_DB_PRIMARY_PATH_DEFAULT = "/tmp/milvus";
static const char* CONFIG_DB_SECONDARY_PATH = "secondary_path";
static const char* CONFIG_DB_SECONDARY_PATH_DEFAULT = "";
static const char* CONFIG_DB_BACKEND_URL = "backend_url";
static const char* CONFIG_DB_BACKEND_URL_DEFAULT = "sqlite://:@:/";
static const char* CONFIG_DB_ARCHIVE_DISK_THRESHOLD = "archive_disk_threshold";
@ -69,6 +65,10 @@ static const char* CONFIG_DB_PRELOAD_TABLE_DEFAULT = "";
/* storage config */
static const char* CONFIG_STORAGE = "storage_config";
static const char* CONFIG_STORAGE_PRIMARY_PATH = "primary_path";
static const char* CONFIG_STORAGE_PRIMARY_PATH_DEFAULT = "/tmp/milvus";
static const char* CONFIG_STORAGE_SECONDARY_PATH = "secondary_path";
static const char* CONFIG_STORAGE_SECONDARY_PATH_DEFAULT = "";
static const char* CONFIG_STORAGE_MINIO_ENABLE = "minio_enable";
static const char* CONFIG_STORAGE_MINIO_ENABLE_DEFAULT = "false";
static const char* CONFIG_STORAGE_MINIO_ADDRESS = "minio_address";
@ -180,10 +180,6 @@ class Config {
/* db config */
Status
CheckDBConfigPrimaryPath(const std::string& value);
Status
CheckDBConfigSecondaryPath(const std::string& value);
Status
CheckDBConfigBackendUrl(const std::string& value);
Status
CheckDBConfigArchiveDiskThreshold(const std::string& value);
@ -194,6 +190,10 @@ class Config {
/* storage config */
Status
CheckStorageConfigPrimaryPath(const std::string& value);
Status
CheckStorageConfigSecondaryPath(const std::string& value);
Status
CheckStorageConfigMinioEnable(const std::string& value);
Status
CheckStorageConfigMinioAddress(const std::string& value);
@ -266,10 +266,6 @@ class Config {
/* db config */
Status
GetDBConfigPrimaryPath(std::string& value);
Status
GetDBConfigSecondaryPath(std::string& value);
Status
GetDBConfigBackendUrl(std::string& value);
Status
GetDBConfigArchiveDiskThreshold(int64_t& value);
@ -282,6 +278,10 @@ class Config {
/* storage config */
Status
GetStorageConfigPrimaryPath(std::string& value);
Status
GetStorageConfigSecondaryPath(std::string& value);
Status
GetStorageConfigMinioEnable(bool& value);
Status
GetStorageConfigMinioAddress(std::string& value);
@ -350,10 +350,6 @@ class Config {
/* db config */
Status
SetDBConfigPrimaryPath(const std::string& value);
Status
SetDBConfigSecondaryPath(const std::string& value);
Status
SetDBConfigBackendUrl(const std::string& value);
Status
SetDBConfigArchiveDiskThreshold(const std::string& value);
@ -364,6 +360,10 @@ class Config {
/* storage config */
Status
SetStorageConfigPrimaryPath(const std::string& value);
Status
SetStorageConfigSecondaryPath(const std::string& value);
Status
SetStorageConfigMinioEnable(const std::string& value);
Status
SetStorageConfigMinioAddress(const std::string& value);

View File

@ -45,7 +45,7 @@ DBWrapper::StartService() {
}
std::string path;
s = config.GetDBConfigPrimaryPath(path);
s = config.GetStorageConfigPrimaryPath(path);
if (!s.ok()) {
std::cerr << s.ToString() << std::endl;
return s;
@ -54,7 +54,7 @@ DBWrapper::StartService() {
opt.meta_.path_ = path + "/db";
std::string db_slave_path;
s = config.GetDBConfigSecondaryPath(db_slave_path);
s = config.GetStorageConfigSecondaryPath(db_slave_path);
if (!s.ok()) {
std::cerr << s.ToString() << std::endl;
return s;

View File

@ -49,15 +49,16 @@ static const char* CONFIG_STR =
" time_zone: UTC+8\n"
"\n"
"db_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
" backend_url: sqlite://:@:/ \n"
" \n"
" # Replace 'dialect' with 'mysql' or 'sqlite'\n"
"\n"
" insert_buffer_size: 4 # GB, maximum insert buffer size allowed\n"
"\n"
"storage_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
"metric_config:\n"
" enable_monitor: false # enable monitoring or not\n"
" collector: prometheus # prometheus\n"

View File

@ -146,16 +146,6 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) {
ASSERT_TRUE(str_val == server_time_zone);
/* db config */
std::string db_primary_path = "/home/zilliz";
ASSERT_TRUE(config.SetDBConfigPrimaryPath(db_primary_path).ok());
ASSERT_TRUE(config.GetDBConfigPrimaryPath(str_val).ok());
ASSERT_TRUE(str_val == db_primary_path);
std::string db_secondary_path = "/home/zilliz";
ASSERT_TRUE(config.SetDBConfigSecondaryPath(db_secondary_path).ok());
ASSERT_TRUE(config.GetDBConfigSecondaryPath(str_val).ok());
ASSERT_TRUE(str_val == db_secondary_path);
std::string db_backend_url = "mysql://root:123456@127.0.0.1:19530/milvus";
ASSERT_TRUE(config.SetDBConfigBackendUrl(db_backend_url).ok());
ASSERT_TRUE(config.GetDBConfigBackendUrl(str_val).ok());
@ -177,6 +167,16 @@ TEST_F(ConfigTest, SERVER_CONFIG_VALID_TEST) {
ASSERT_TRUE(int64_val == db_insert_buffer_size);
/* storage config */
std::string storage_primary_path = "/home/zilliz";
ASSERT_TRUE(config.SetStorageConfigPrimaryPath(storage_primary_path).ok());
ASSERT_TRUE(config.GetStorageConfigPrimaryPath(str_val).ok());
ASSERT_TRUE(str_val == storage_primary_path);
std::string storage_secondary_path = "/home/zilliz";
ASSERT_TRUE(config.SetStorageConfigSecondaryPath(storage_secondary_path).ok());
ASSERT_TRUE(config.GetStorageConfigSecondaryPath(str_val).ok());
ASSERT_TRUE(str_val == storage_secondary_path);
bool storage_minio_enable = false;
ASSERT_TRUE(config.SetStorageConfigMinioEnable(std::to_string(storage_minio_enable)).ok());
ASSERT_TRUE(config.GetStorageConfigMinioEnable(bool_val).ok());
@ -329,9 +329,9 @@ TEST_F(ConfigTest, SERVER_CONFIG_CLI_TEST) {
ASSERT_TRUE(s.ok());
/* db config */
std::string db_primary_path = "/home/zilliz";
get_cmd = gen_get_command(ms::CONFIG_DB, ms::CONFIG_DB_PRIMARY_PATH);
set_cmd = gen_set_command(ms::CONFIG_DB, ms::CONFIG_DB_PRIMARY_PATH, db_primary_path);
std::string db_insert_buffer_size = "4";
get_cmd = gen_get_command(ms::CONFIG_DB, ms::CONFIG_DB_INSERT_BUFFER_SIZE);
set_cmd = gen_set_command(ms::CONFIG_DB, ms::CONFIG_DB_INSERT_BUFFER_SIZE, db_insert_buffer_size);
s = config.ProcessConfigCli(dummy, set_cmd);
ASSERT_FALSE(s.ok());
s = config.ProcessConfigCli(result, get_cmd);
@ -484,10 +484,6 @@ TEST_F(ConfigTest, SERVER_CONFIG_INVALID_TEST) {
ASSERT_FALSE(config.SetServerConfigTimeZone("UTCA").ok());
/* db config */
ASSERT_FALSE(config.SetDBConfigPrimaryPath("").ok());
// ASSERT_FALSE(config.SetDBConfigSecondaryPath("").ok());
ASSERT_FALSE(config.SetDBConfigBackendUrl("http://www.google.com").ok());
ASSERT_FALSE(config.SetDBConfigBackendUrl("sqlite://:@:").ok());
ASSERT_FALSE(config.SetDBConfigBackendUrl("mysql://root:123456@127.0.0.1/milvus").ok());
@ -501,6 +497,10 @@ TEST_F(ConfigTest, SERVER_CONFIG_INVALID_TEST) {
ASSERT_FALSE(config.SetDBConfigInsertBufferSize("2048").ok());
/* storage config */
ASSERT_FALSE(config.SetStorageConfigPrimaryPath("").ok());
// ASSERT_FALSE(config.SetStorageConfigSecondaryPath("").ok());
ASSERT_FALSE(config.SetStorageConfigMinioEnable("10").ok());
ASSERT_FALSE(config.SetStorageConfigMinioAddress("127.0.0").ok());

View File

@ -73,10 +73,10 @@ class RpcHandlerTest : public testing::Test {
milvus::engine::DBOptions opt;
milvus::server::Config::GetInstance().SetDBConfigBackendUrl("sqlite://:@:/");
milvus::server::Config::GetInstance().SetDBConfigPrimaryPath("/tmp/milvus_test");
milvus::server::Config::GetInstance().SetDBConfigSecondaryPath("");
milvus::server::Config::GetInstance().SetDBConfigArchiveDiskThreshold("");
milvus::server::Config::GetInstance().SetDBConfigArchiveDaysThreshold("");
milvus::server::Config::GetInstance().SetStorageConfigPrimaryPath("/tmp/milvus_test");
milvus::server::Config::GetInstance().SetStorageConfigSecondaryPath("");
milvus::server::Config::GetInstance().SetCacheConfigCacheInsertData("");
milvus::server::Config::GetInstance().SetEngineConfigOmpThreadNum("");

View File

@ -37,14 +37,15 @@ static const char* VALID_CONFIG_STR =
" time_zone: UTC+8\n"
"\n"
"db_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
" backend_url: sqlite://:@:/ \n"
"\n"
" insert_buffer_size: 4 # GB, maximum insert buffer size allowed\n"
" preload_table: \n"
"\n"
"storage_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
"metric_config:\n"
" enable_monitor: false # enable monitoring or not\n"
" collector: prometheus # prometheus\n"

View File

@ -25,6 +25,8 @@ namespace {
static const char* CONFIG_STR =
"storage_config:\n"
" primary_path: /tmp/milvus\n"
" secondary_path:\n"
" minio_enable: true\n"
" minio_address: 127.0.0.1\n"
" minio_port: 9000\n"

View File

@ -33,15 +33,16 @@ static const char* CONFIG_STR =
" time_zone: UTC+8\n"
"\n"
"db_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
" backend_url: sqlite://:@:/ # URI format: dialect://username:password@host:port/database\n"
" \n"
" # Replace 'dialect' with 'mysql' or 'sqlite'\n"
"\n"
" insert_buffer_size: 4 # GB, maximum insert buffer size allowed\n"
"\n"
"storage_config:\n"
" primary_path: /tmp/milvus # path used to store data and meta\n"
" secondary_path: # path used to store data only, split by semicolon\n"
"\n"
"metric_config:\n"
" enable_monitor: false # enable monitoring or not\n"
" collector: prometheus # prometheus\n"