mirror of https://github.com/milvus-io/milvus.git
* remove log_config from code and script
Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * update changelog Signed-off-by: yudong.cai <yudong.cai@zilliz.com> * update script Signed-off-by: yudong.cai <yudong.cai@zilliz.com>pull/2529/head
parent
078100926f
commit
d67157235f
|
@ -25,6 +25,7 @@ Please mark all change in change log and use the issue from GitHub
|
||||||
|
|
||||||
## Improvement
|
## Improvement
|
||||||
- \#2307 Disable index SPTAG by default
|
- \#2307 Disable index SPTAG by default
|
||||||
|
- \#2353 Remove log_config from code and scripts
|
||||||
- \#2370 Clean compile warning
|
- \#2370 Clean compile warning
|
||||||
- \#2381 Upgrade FAISS to 1.6.3
|
- \#2381 Upgrade FAISS to 1.6.3
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
../bin/milvus_server -c ../conf/server_config.yaml -l ../conf/log_config.conf
|
../bin/milvus_server -c ../conf/server_config.yaml
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,6 @@ main(int argc, char* argv[]) {
|
||||||
print_banner();
|
print_banner();
|
||||||
|
|
||||||
static struct option long_options[] = {{"conf_file", required_argument, nullptr, 'c'},
|
static struct option long_options[] = {{"conf_file", required_argument, nullptr, 'c'},
|
||||||
{"log_conf_file", required_argument, nullptr, 'l'},
|
|
||||||
{"help", no_argument, nullptr, 'h'},
|
{"help", no_argument, nullptr, 'h'},
|
||||||
{"daemon", no_argument, nullptr, 'd'},
|
{"daemon", no_argument, nullptr, 'd'},
|
||||||
{"pid_file", required_argument, nullptr, 'p'},
|
{"pid_file", required_argument, nullptr, 'p'},
|
||||||
|
@ -73,7 +72,7 @@ main(int argc, char* argv[]) {
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
int64_t start_daemonized = 0;
|
int64_t start_daemonized = 0;
|
||||||
|
|
||||||
std::string config_filename, log_config_file;
|
std::string config_filename;
|
||||||
std::string pid_filename;
|
std::string pid_filename;
|
||||||
std::string app_name = argv[0];
|
std::string app_name = argv[0];
|
||||||
milvus::Status s;
|
milvus::Status s;
|
||||||
|
@ -86,7 +85,7 @@ main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int value;
|
int value;
|
||||||
while ((value = getopt_long(argc, argv, "c:l:p:dh", long_options, &option_index)) != -1) {
|
while ((value = getopt_long(argc, argv, "c:p:dh", long_options, &option_index)) != -1) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'c': {
|
case 'c': {
|
||||||
char* config_filename_ptr = strdup(optarg);
|
char* config_filename_ptr = strdup(optarg);
|
||||||
|
@ -95,13 +94,6 @@ main(int argc, char* argv[]) {
|
||||||
std::cout << "Loading configuration from: " << config_filename << std::endl;
|
std::cout << "Loading configuration from: " << config_filename << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'l': {
|
|
||||||
char* log_filename_ptr = strdup(optarg);
|
|
||||||
log_config_file = log_filename_ptr;
|
|
||||||
free(log_filename_ptr);
|
|
||||||
std::cout << "Initializing log config from: " << log_config_file << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 'p': {
|
case 'p': {
|
||||||
char* pid_filename_ptr = strdup(optarg);
|
char* pid_filename_ptr = strdup(optarg);
|
||||||
pid_filename = pid_filename_ptr;
|
pid_filename = pid_filename_ptr;
|
||||||
|
@ -132,7 +124,7 @@ main(int argc, char* argv[]) {
|
||||||
signal(SIGUSR2, milvus::server::SignalUtil::HandleSignal);
|
signal(SIGUSR2, milvus::server::SignalUtil::HandleSignal);
|
||||||
signal(SIGTERM, milvus::server::SignalUtil::HandleSignal);
|
signal(SIGTERM, milvus::server::SignalUtil::HandleSignal);
|
||||||
|
|
||||||
server.Init(start_daemonized, pid_filename, config_filename, log_config_file);
|
server.Init(start_daemonized, pid_filename, config_filename);
|
||||||
|
|
||||||
s = server.Start();
|
s = server.Start();
|
||||||
if (s.ok()) {
|
if (s.ok()) {
|
||||||
|
|
|
@ -47,12 +47,10 @@ Server::GetInstance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename,
|
Server::Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename) {
|
||||||
const std::string& log_config_file) {
|
|
||||||
daemonized_ = daemonized;
|
daemonized_ = daemonized;
|
||||||
pid_filename_ = pid_filename;
|
pid_filename_ = pid_filename;
|
||||||
config_filename_ = config_filename;
|
config_filename_ = config_filename;
|
||||||
log_config_file_ = log_config_file;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -63,10 +61,6 @@ Server::Daemonize() {
|
||||||
|
|
||||||
std::cout << "Milvus server run in daemonize mode";
|
std::cout << "Milvus server run in daemonize mode";
|
||||||
|
|
||||||
// std::string log_path(GetLogDirFullPath());
|
|
||||||
// log_path += "zdb_server.(INFO/WARNNING/ERROR/CRITICAL)";
|
|
||||||
// LOG_SERVER_INFO_ << "Log will be exported to: " + log_path);
|
|
||||||
|
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
|
|
||||||
// Fork off the parent process
|
// Fork off the parent process
|
||||||
|
|
|
@ -23,8 +23,7 @@ class Server {
|
||||||
GetInstance();
|
GetInstance();
|
||||||
|
|
||||||
void
|
void
|
||||||
Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename,
|
Init(int64_t daemonized, const std::string& pid_filename, const std::string& config_filename);
|
||||||
const std::string& log_config_file);
|
|
||||||
|
|
||||||
Status
|
Status
|
||||||
Start();
|
Start();
|
||||||
|
@ -51,7 +50,6 @@ class Server {
|
||||||
int pid_fd_ = -1;
|
int pid_fd_ = -1;
|
||||||
std::string pid_filename_;
|
std::string pid_filename_;
|
||||||
std::string config_filename_;
|
std::string config_filename_;
|
||||||
std::string log_config_file_;
|
|
||||||
}; // Server
|
}; // Server
|
||||||
|
|
||||||
} // namespace server
|
} // namespace server
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./cmake_build/src/milvus_server -c ./conf/server_config.yaml -l ./conf/log_config.conf &
|
./cmake_build/src/milvus_server -c ./conf/server_config.yaml &
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue