From f8353c612fb655348fdd69ff942a04560d8d55dc Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 5 Nov 2024 12:11:22 +0200 Subject: Retry database operations on recoverable failures in ci_start class functions --- mod/database-module.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mod/database-module.cxx') 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";}); -- cgit v1.1