Permalink
Browse files

Fixed bad log in bootstrap retry logic.

  • Loading branch information...
1 parent 61b01fa commit f678066983687be3558083a6342bd1254081eb83 @bbansal bbansal committed Nov 20, 2009
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/java/voldemort/client/AbstractStoreClientFactory.java
@@ -209,12 +209,14 @@ public String bootstrapMetadataWithRetries(String key, URI[] urls) {
try {
return bootstrapMetadata(key, urls);
} catch(BootstrapFailureException e) {
- int backOffTime = 5 * nTries;
- logger.warn("Failed to bootstrap will try again after" + backOffTime);
- try {
- Thread.sleep(backOffTime * 1000);
- } catch(InterruptedException e1) {
- throw new RuntimeException(e1);
+ if(nTries < this.maxBootstrapRetries) {
+ int backOffTime = 5 * nTries;
+ logger.warn("Failed to bootstrap will try again after " + backOffTime + "s.");
+ try {
+ Thread.sleep(backOffTime * 1000);
+ } catch(InterruptedException e1) {
+ throw new RuntimeException(e1);
+ }
}
}
}

0 comments on commit f678066

Please sign in to comment.