dolphinscheduler
dolphinscheduler copied to clipboard
[Improvement][Service] The method refreshMasterList was executed one more time in function putAll.
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
In the MasterPriorityQueue class, the refreshMasterList method is executed each time when a Server is added by put method. Therefore, there is no need to execute the refreshMasterList method again after iterating through the putAll method.
public void put(Server serverInfo) {
this.queue.put(serverInfo);
refreshMasterList();
}
public void putAll(Collection<Server> serverList) { for (Server server : serverList) { this.queue.put(server); } refreshMasterList(); // should remove }
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct