Skip to content

Commit e5b90af

Browse files
ehennumehennum
authored andcommitted
always retry on 502 or 504 so ALB / ELB configuration is optional #999
1 parent 200e174 commit e5b90af

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/impl/DatabaseClientImpl.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ public DatabaseClientImpl(RESTServices services, String host, int port, String d
6868
this.securityContext = securityContext;
6969
this.connectionType = connectionType;
7070

71-
if (connectionType == ConnectionType.GATEWAY) {
72-
Set<Integer> retryStatus = services.getRetryStatus();
73-
retryStatus.add(RESTServices.STATUS_BAD_GATEWAY);
74-
retryStatus.add(RESTServices.STATUS_GATEWAY_TIMEOUT);
75-
}
7671
services.setDatabaseClient(this);
7772
}
7873

marklogic-client-api/src/main/java/com/marklogic/client/impl/OkHttpServices.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ protected ThreadState initialValue() {
247247
};
248248

249249
public OkHttpServices() {
250+
retryStatus.add(STATUS_BAD_GATEWAY);
250251
retryStatus.add(STATUS_SERVICE_UNAVAILABLE);
252+
retryStatus.add(STATUS_GATEWAY_TIMEOUT);
251253
}
252254

253255
@Override

0 commit comments

Comments
 (0)