Skip to content

Commit

Permalink
Properly serialize availabilityZone and remove maxRetries from Reques…
Browse files Browse the repository at this point in the history
…tAttempt
  • Loading branch information
gavinbunney committed Sep 14, 2023
1 parent 5bfd822 commit e67b47c
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ public class RequestAttempt
private String availabilityZone;
private long readTimeout;
private int connectTimeout;
private int maxRetries;

public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip, String chosenWarmupLB, int status, String error, String exceptionType,
int readTimeout, int connectTimeout, int maxRetries)
int readTimeout, int connectTimeout)
{
if (attemptNumber < 1) {
throw new IllegalArgumentException("Attempt number must be greater than 0! - " + attemptNumber);
Expand Down Expand Up @@ -96,7 +95,6 @@ public RequestAttempt(int attemptNumber, InstanceInfo server, String targetVip,
this.exceptionType = exceptionType;
this.readTimeout = readTimeout;
this.connectTimeout = connectTimeout;
this.maxRetries = maxRetries;
}

public RequestAttempt(final DiscoveryResult server, final IClientConfig clientConfig, int attemptNumber, int readTimeout) {
Expand Down Expand Up @@ -219,11 +217,6 @@ public int getConnectTimeout()
return connectTimeout;
}

public int getMaxRetries()
{
return maxRetries;
}

public void setStatus(int status)
{
this.status = status;
Expand Down Expand Up @@ -330,11 +323,6 @@ else if (t instanceof SSLHandshakeException) {
}
}

public void setMaxRetries(int maxRetries)
{
this.maxRetries = maxRetries;
}

@Override
public String toString()
{
Expand All @@ -357,6 +345,7 @@ public ObjectNode toJsonNode()
putNullableAttribute(root, "cause", cause);
putNullableAttribute(root, "exceptionType", exceptionType);
putNullableAttribute(root, "region", region);
putNullableAttribute(root, "availabilityZone", availabilityZone);
putNullableAttribute(root, "asg", asg);
putNullableAttribute(root, "instanceId", instanceId);
putNullableAttribute(root, "vip", vip);
Expand Down

0 comments on commit e67b47c

Please sign in to comment.