aboutsummaryrefslogtreecommitdiff
path: root/mod/database-module.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-11-05 12:11:22 +0200
committerKaren Arutyunov <karen@codesynthesis.com>2024-11-05 15:27:37 +0200
commitf8353c612fb655348fdd69ff942a04560d8d55dc (patch)
tree4d4a18bfe46770c86fe7101c6aed06da15e0e345 /mod/database-module.cxx
parent153f38c301f48dc4c1c363ab81ca5a938fc83a7a (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.cxx8
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";});