diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-11-05 12:11:22 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-12-10 16:44:55 +0200 |
commit | e5d9d1fbec4a00ebc52fdb94d97f4140a08ecd28 (patch) | |
tree | 42e6ec5cca72c8706c5e12d42349a237878dfe42 /mod/database-module.cxx | |
parent | ba1b6e96d3675d3dc7021213f08ed56359648ee4 (diff) |
Retry database operations on recoverable failures in ci_start class functions
Diffstat (limited to 'mod/database-module.cxx')
-rw-r--r-- | mod/database-module.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mod/database-module.cxx b/mod/database-module.cxx index bbb3e59..bce8c93 100644 --- a/mod/database-module.cxx +++ b/mod/database-module.cxx @@ -119,10 +119,14 @@ namespace brep } catch (const odb::recoverable& e) { + HANDLER_DIAG; + + // If no more retries left, don't re-throw odb::recoverable not to + // retry at the upper level. + // if (retry-- == 0) - throw; + fail << e << "; no tenant service state update retries left"; - HANDLER_DIAG; l1 ([&]{trace << e << "; " << retry + 1 << " tenant service " << "state update retries left";}); |