Skip to content

Commit

Permalink
Merge pull request #25626 from vespa-engine/bratseth/remove-temporary…
Browse files Browse the repository at this point in the history
…-logging

Remove temporary logging
  • Loading branch information
freva authored Jan 18, 2023
2 parents c47ed54 + 4ba118b commit fe5cb46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ private List<Node> prepareWithLocks(ApplicationId application, ClusterSpec clust
HostSharing sharing = hostSharing(cluster, hostType);
Version osVersion = nodeRepository.osVersions().targetFor(hostType).orElse(Version.emptyVersion);
NodeAllocation.HostDeficit deficit = allocation.hostDeficit().get();
// TODO: Remove
log.info("In " + application + ": " + deficit + ": " +
allocation.lastOffered().stream().map(n -> n.toString() + "[resizable: " + n.isResizable).collect(Collectors.joining(", ")));

List<Node> hosts = new ArrayList<>();
Consumer<List<ProvisionedHost>> provisionedHostsConsumer = provisionedHosts -> {
hosts.addAll(provisionedHosts.stream().map(ProvisionedHost::generateHost).toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ class NodeAllocation {
private final NodeResourceLimits nodeResourceLimits;
private final Optional<String> requiredHostFlavor;

private List<NodeCandidate> lastOffered;

NodeAllocation(NodeList allNodes, ApplicationId application, ClusterSpec cluster, NodeSpec requestedNodes,
Supplier<Integer> nextIndex, NodeRepository nodeRepository) {
this.allNodes = allNodes;
Expand All @@ -99,7 +97,6 @@ class NodeAllocation {
.with(FetchVector.Dimension.CLUSTER_TYPE, cluster.type().name())
.value())
.filter(s -> !s.isBlank());
this.lastOffered = List.of();
}

/**
Expand All @@ -112,7 +109,6 @@ class NodeAllocation {
* @param candidates the nodes which are potentially on offer. These may belong to a different application etc.
*/
void offer(List<NodeCandidate> candidates) {
lastOffered = List.copyOf(candidates);
for (NodeCandidate candidate : candidates) {
if (candidate.allocation().isPresent()) {
Allocation allocation = candidate.allocation().get();
Expand Down Expand Up @@ -161,8 +157,6 @@ else if (! saturated() && hasCompatibleResources(candidate)) {
}
}

public List<NodeCandidate> lastOffered() { return lastOffered; }

/** Returns the cause of retirement for given candidate */
private Retirement shouldRetire(NodeCandidate candidate, List<NodeCandidate> candidates) {
if ( ! requestedNodes.considerRetiring()) {
Expand Down

0 comments on commit fe5cb46

Please sign in to comment.