lenboo commented on code in PR #10093:
URL: https://github.com/apache/dolphinscheduler/pull/10093#discussion_r875594182
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/queue/TaskPriority.java:
##########
@@ -169,15 +182,20 @@ public int compareTo(TaskPriority other) {
if (this.getTaskInstancePriority() < other.getTaskInstancePriority()) {
return -1;
}
-
+ if(this.getTaskGroupPriority() != other.getTaskGroupPriority()){
+ // larger number, higher priority
+ return Constants.OPPOSITE_VALUE *
Integer.compare(this.getTaskGroupPriority(), other.getTaskGroupPriority());
+ }
if (this.getTaskId() > other.getTaskId()) {
return 1;
}
if (this.getTaskId() < other.getTaskId()) {
return -1;
}
-
- return this.getGroupName().compareTo(other.getGroupName());
+ if(!this.getGroupName().equals(other.getGroupName())){
Review Comment:
> groupName can be null?
maybe, i will check it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]