apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code

Home Page:https://dolphinscheduler.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

DaqianLiao opened this issue · comments

Search before asking

  • 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 serverList) {
for (Server server : serverList) {
this.queue.put(server);
}
refreshMasterList(); // should remove
}

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct