Skip to content

Commit

Permalink
Revert 'Check the correct container during writeback (#236)' [DO NOT …
Browse files Browse the repository at this point in the history
…MERGE]
  • Loading branch information
kthui committed Aug 12, 2023
1 parent 007c263 commit b62dae1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/model_repository_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2156,10 +2156,10 @@ ModelRepositoryManager::DependencyGraph::Writeback(
for (const auto& model_id : affected_models) {
// An affected model can be deleted, so the presence of the model must be
// checked.
auto* updated_node = updated_dependency_graph.FindNode(
model_id, false /* allow_fuzzy_matching */);
if (updated_node != nullptr) {
auto* node = FindNode(model_id, false /* allow_fuzzy_matching */);
auto node = FindNode(model_id, false /* allow_fuzzy_matching */);
if (node != nullptr) {
auto updated_node = updated_dependency_graph.FindNode(
model_id, false /* allow_fuzzy_matching */);
// Writeback
node->status_ = updated_node->status_;
node->checked_ = updated_node->checked_;
Expand Down Expand Up @@ -2195,10 +2195,10 @@ ModelRepositoryManager::ModelInfoMap::Writeback(
for (auto& model_id : affected_models) {
// An affected model can be deleted, so the presence of the model must be
// checked.
auto itr = updated_model_info.map_.find(model_id);
if (itr != updated_model_info.map_.end()) {
auto* updated_info = itr->second.get();
auto* info = map_.at(model_id).get();
auto itr = map_.find(model_id);
if (itr != map_.end()) {
auto info = itr->second.get();
auto updated_info = updated_model_info.map_.at(model_id).get();
// Writeback
info->mtime_nsec_ = updated_info->mtime_nsec_;
}
Expand Down

0 comments on commit b62dae1

Please sign in to comment.