Skip to content

Commit

Permalink
Fix policy update issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguo committed Dec 27, 2024
1 parent 5dc497f commit b73d0a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public List<Service> onUpdate(List<Service> updates, Set<String> deletes, Policy
result.add(old);
}
}
} else if (old.getVersion() < update.getVersion()) {
} else if (old.getVersion() != update.getVersion()) {
// Update
ServiceOp.onUpdate(old, update, merger, owner);
result.add(old);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected void updateItems(GovernancePolicy policy, List<Service> items, ConfigE
loadedServices.add(item.getName());
newVersions.put(item.getName(), item.getVersion());
long oldVersion = oldVersions.getOrDefault(item.getName(), -1L);
if (item.getVersion() > oldVersion) {
if (item.getVersion() != oldVersion) {
updates.add(item);
}
}
Expand Down

0 comments on commit b73d0a1

Please sign in to comment.