Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ISPN-2992: Handle the case where the timeout elapses before the backu…

…p response returns.
  • Loading branch information...
commit 3193200a507f206b0cfff314c82d7e41a428ddbf 1 parent b2d30aa
Erik Salter authored Mircea Markus committed
View
8 core/src/main/java/org/infinispan/remoting/transport/jgroups/JGroupsBackupResponse.java
@@ -66,13 +66,19 @@ public void waitForBackupToFinish() throws Exception {
errors = new HashMap<String, Throwable>(syncBackupCalls.size());
long elapsedTime = 0;
for (Map.Entry<XSiteBackup, Future<Object>> entry : syncBackupCalls.entrySet()) {
+
long timeout = entry.getKey().getTimeout();
String siteName = entry.getKey().getSiteName();
+
if (timeout > 0) { //0 means wait forever
timeout -= deductFromTimeout;
timeout -= elapsedTime;
- if (timeout <= 0 && !entry.getValue().isDone())
+ if (timeout <= 0 && !entry.getValue().isDone() ) {
+ log.tracef( "Timeout period %ld exhausted with site %s", entry.getKey().getTimeout(), siteName);
errors.put(siteName, newTimeoutException(entry, entry.getKey().getTimeout()));
+ addCommunicationError(siteName);
+ continue;
+ }
}
long startNanos = System.nanoTime();
Please sign in to comment.
Something went wrong with that request. Please try again.