Skip to content

Commit

Permalink
Minor optimization to previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
absurdfarce committed Feb 14, 2022
1 parent 73f9141 commit 71e5757
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,8 @@ protected Queue<Node> maybeAddDcFailover(@Nullable Request request, @NonNull Que

@Override
protected Object[] computeNodes() {
Set<String> dcs = liveNodes.dcs();
Object[] remoteNodes =
dcs.stream()
liveNodes.dcs().stream()
.filter(Predicates.not(Predicates.equalTo(localDc)))
.flatMap(dc -> liveNodes.dc(dc).stream().limit(maxNodesPerRemoteDc))
.toArray();
Expand Down

0 comments on commit 71e5757

Please sign in to comment.