Skip to content

Commit 535e3db

Browse files
ehennumehennum
authored andcommitted
revert to inner retry #999
1 parent c2dc92c commit 535e3db

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/datamovement/HostAvailabilityListener.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -232,30 +232,8 @@ private synchronized boolean processException(Batcher batcher, Throwable throwab
232232
}
233233

234234
private boolean processGatewayException(Batcher batcher, Throwable throwable, String host) {
235-
boolean isRetryException = (throwable instanceof FailedRetryException);
236-
boolean shouldWeRetry = false;
237-
if ( isRetryException == true ) {
238-
ForestConfiguration existingForestConfig = batcher.getForestConfig();
239-
Forest[] existingForests = existingForestConfig.listForests();
240-
ForestConfiguration updatedForestConfig = moveMgr.readForestConfig();
241-
Forest[] updatedForests = updatedForestConfig.listForests();
242-
boolean forestsChanged = (existingForests.length != updatedForests.length);
243-
if (!forestsChanged) {
244-
Set<String> existingNames = Arrays.stream(existingForests)
245-
.map(Forest::getForestName)
246-
.collect(Collectors.toSet());
247-
forestsChanged = Arrays.stream(updatedForests)
248-
.anyMatch(forest -> !existingNames.contains(forest.getForestName()));
249-
}
250-
if (forestsChanged) {
251-
batcher.withForestConfig(updatedForestConfig);
252-
shouldWeRetry = true;
253-
} else {
254-
logger.error("retry exception without forest failover for " + batcher.getJobName() + "\"", throwable);
255-
moveMgr.stopJob(batcher);
256-
}
257-
}
258-
return shouldWeRetry;
235+
// if the nested retry failed, assume the MarkLogic cluster is unavailable
236+
return false;
259237
}
260238

261239
private boolean processForestHostException(Batcher batcher, Throwable throwable, String host) {

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

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

7171
services.setDatabaseClient(this);
72-
if (connectionType == ConnectionType.GATEWAY) {
73-
services.setMaxDelay(45000);
74-
}
7572
}
7673

7774
@Override

0 commit comments

Comments
 (0)