Skip to content

Commit

Permalink
#4900 Fix linkismanager allocation ECM error logic, adjust resource a…
Browse files Browse the repository at this point in the history
…llocation logic from large to small (#4901)

Co-authored-by: weipengfei <[email protected]>
  • Loading branch information
sjgllgh and weipengfei authored Sep 8, 2023
1 parent 8181efc commit 8dfcf86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ private Comparator<Node> sortByResource() {
.getNodeResource()
.getLeftResource()
.moreThan(nodeBRm.getNodeResource().getLeftResource())) {
return 1;
} else {
return -1;
} else {
return 1;
}
}
} catch (Throwable t) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ private Comparator<Node> sortByScore() {
ScoreServiceInstance instanceB = (ScoreServiceInstance) nodeB;
try {
if (instanceA.getScore() > instanceB.getScore()) {
return 1;
return -1;
}
} catch (Exception e) {
logger.warn("Failed to Compare resource ", e);
return -1;
}
return -1;
return 1;
} else {
return -1;
}
Expand Down

0 comments on commit 8dfcf86

Please sign in to comment.