mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
MS-417 YAML sequence load disable cause scheduler startup failed
Former-commit-id: d9055c6ed60306ee8cfc09f13694b9186167a4a5
This commit is contained in:
parent
2e8f018e40
commit
527026c4a0
@ -8,6 +8,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- MS-411 - Fix metric unittest linking error
|
||||
- MS-412 - Fix gpu cache logical error
|
||||
- MS-416 - ExecutionEngineImpl::GpuCache has not return value cause crash
|
||||
- MS-417 - YAML sequence load disable cause scheduler startup failed
|
||||
|
||||
## Improvement
|
||||
- MS-327 - Clean code for milvus
|
||||
|
||||
@ -73,19 +73,19 @@ YamlConfigMgr::SetChildConfig(const YAML::Node& node,
|
||||
return false;
|
||||
}
|
||||
|
||||
//bool
|
||||
//YamlConfigMgr::SetSequence(const YAML::Node &node,
|
||||
// const std::string &child_name,
|
||||
// ConfigNode &config) {
|
||||
// if(node[child_name].IsDefined ()) {
|
||||
// size_t cnt = node[child_name].size();
|
||||
// for(size_t i = 0; i < cnt; i++){
|
||||
// config.AddSequenceItem(child_name, node[child_name][i].as<std::string>());
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
//}
|
||||
bool
|
||||
YamlConfigMgr::SetSequence(const YAML::Node &node,
|
||||
const std::string &child_name,
|
||||
ConfigNode &config) {
|
||||
if(node[child_name].IsDefined ()) {
|
||||
size_t cnt = node[child_name].size();
|
||||
for(size_t i = 0; i < cnt; i++){
|
||||
config.AddSequenceItem(child_name, node[child_name][i].as<std::string>());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
YamlConfigMgr::LoadConfigNode(const YAML::Node& node, ConfigNode& config) {
|
||||
@ -98,8 +98,8 @@ YamlConfigMgr::LoadConfigNode(const YAML::Node& node, ConfigNode& config) {
|
||||
SetConfigValue(node, key, config);
|
||||
} else if(node[key].IsMap()){
|
||||
SetChildConfig(node, key, config);
|
||||
// } else if(node[key].IsSequence()){
|
||||
// SetSequence(node, key, config);
|
||||
} else if(node[key].IsSequence()){
|
||||
SetSequence(node, key, config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,10 +33,10 @@ class YamlConfigMgr : public IConfigMgr {
|
||||
const std::string &name,
|
||||
ConfigNode &config);
|
||||
|
||||
// bool
|
||||
// SetSequence(const YAML::Node &node,
|
||||
// const std::string &child_name,
|
||||
// ConfigNode &config);
|
||||
bool
|
||||
SetSequence(const YAML::Node &node,
|
||||
const std::string &child_name,
|
||||
ConfigNode &config);
|
||||
|
||||
void LoadConfigNode(const YAML::Node& node, ConfigNode& config);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user