Skip to content

Commit

Permalink
fix(interactive): Fix the bug of plugin not being deleted when deleti…
Browse files Browse the repository at this point in the history
…ng graph (alibaba#3785)

Fix alibaba#3781
  • Loading branch information
zhanglei1949 authored May 13, 2024
1 parent 9908dc9 commit fda099f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flex/storages/metadata/default_graph_meta_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ Result<PluginMeta> DefaultGraphMetaStore::GetPluginMeta(
}
std::string meta_str = res.move_value();
auto meta = PluginMeta::FromJson(meta_str);
if (meta.bound_graph != graph_id) {
return Result<PluginMeta>(
Status(StatusCode::InValidArgument, "Plugin not belongs to the graph"));
}
meta.id = plugin_id;
return Result<PluginMeta>(meta);
}
Expand Down Expand Up @@ -162,7 +166,7 @@ Result<bool> DefaultGraphMetaStore::DeletePluginMetaByGraphId(
}
std::vector<PluginId> plugin_ids;
for (auto& meta_str : res.value()) {
auto plugin_meta = PluginMeta::FromJson(meta_str);
auto plugin_meta = PluginMeta::FromJson(meta_str.second);
if (plugin_meta.bound_graph == graph_id) {
plugin_ids.push_back(plugin_meta.id);
}
Expand Down

0 comments on commit fda099f

Please sign in to comment.