From 1f06d0f65f5789b32b68b92d318388a1a66fbe7d Mon Sep 17 00:00:00 2001 From: Gavin Bunney <409207+gavinbunney@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:19:29 -0700 Subject: [PATCH] Properly serialize availabilityZone and remove maxRetries from RequestAttempt (#1639) --- .../com/netflix/zuul/niws/RequestAttempt.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java index 5a7a413ae5..7cdb538e6d 100644 --- a/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java +++ b/zuul-core/src/main/java/com/netflix/zuul/niws/RequestAttempt.java @@ -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); @@ -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) { @@ -219,11 +217,6 @@ public int getConnectTimeout() return connectTimeout; } - public int getMaxRetries() - { - return maxRetries; - } - public void setStatus(int status) { this.status = status; @@ -330,11 +323,6 @@ else if (t instanceof SSLHandshakeException) { } } - public void setMaxRetries(int maxRetries) - { - this.maxRetries = maxRetries; - } - @Override public String toString() { @@ -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);