DatabaseManager: move retry timeout out from finally clause
Change-Id: If4760bdaa8ac64d5db80c7b6700d75a89099f179
Showing
1 changed file
with
1 additions
and
2 deletions
... | @@ -264,14 +264,13 @@ public class DatabaseManager implements DatabaseService, DatabaseAdminService { | ... | @@ -264,14 +264,13 @@ public class DatabaseManager implements DatabaseService, DatabaseAdminService { |
264 | } catch (DatabaseException e) { | 264 | } catch (DatabaseException e) { |
265 | log.debug("Failed to listTables. Will retry later...", e); | 265 | log.debug("Failed to listTables. Will retry later...", e); |
266 | Thread.sleep(RETRY_MS); | 266 | Thread.sleep(RETRY_MS); |
267 | - } finally { | 267 | + } |
268 | if (retries == ACTIVATE_MAX_RETRIES) { | 268 | if (retries == ACTIVATE_MAX_RETRIES) { |
269 | log.error("Failed to listTables after multiple attempts. Giving up."); | 269 | log.error("Failed to listTables after multiple attempts. Giving up."); |
270 | // Exiting hoping things will be fixed by the time | 270 | // Exiting hoping things will be fixed by the time |
271 | // others start using the service | 271 | // others start using the service |
272 | return; | 272 | return; |
273 | } | 273 | } |
274 | - } | ||
275 | retries++; | 274 | retries++; |
276 | } while (true); | 275 | } while (true); |
277 | } | 276 | } | ... | ... |
-
Please register or login to post a comment