Skip to content

Commit a1a7ff4

Browse files
authored
Fix: Skip failures in mDeduceAndSetContainerBaseDirFunc to preserve other metadata (#2165)
1 parent 98cb312 commit a1a7ff4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: core/file_server/FileDiscoveryOptions.cpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -746,15 +746,17 @@ bool FileDiscoveryOptions::UpdateContainerInfo(const Json::Value& paramsJSON, co
746746
"skip this path")("params", paramsJSON.toStyledString())("errorMsg", errorMsg));
747747
return false;
748748
}
749+
bool success = true;
749750
// if update all, clear and reset
750751
mContainerInfos->clear();
751-
for (unordered_map<string, ContainerInfo>::iterator iter = allPathMap.begin(); iter != allPathMap.end(); ++iter) {
752-
if (!mDeduceAndSetContainerBaseDirFunc(iter->second, ctx, this)) {
753-
return false;
752+
for (auto& iter : allPathMap) {
753+
if (!mDeduceAndSetContainerBaseDirFunc(iter.second, ctx, this)) {
754+
success = false;
755+
continue;
754756
}
755-
mContainerInfos->push_back(iter->second);
757+
mContainerInfos->push_back(iter.second);
756758
}
757-
return true;
759+
return success;
758760
}
759761

760762
bool FileDiscoveryOptions::DeleteContainerInfo(const Json::Value& paramsJSON) {

0 commit comments

Comments
 (0)