dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Improvement][Service] The method refreshMasterList was executed one more time in function putAll.

Open DaqianLiao opened this issue 3 months ago • 0 comments

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

DaqianLiao avatar May 09 '24 08:05 DaqianLiao