From d8de3ca5fe6e5f3e94ae70c42034bf5ff980b118 Mon Sep 17 00:00:00 2001 From: Steven Murray <Steven.Murray@cern.ch> Date: Tue, 30 Jan 2018 23:15:55 +0100 Subject: [PATCH] cta/CTA#186 CTA should cope with idle database connections being dropped by the database server Corrected handling of LostDatabaseConnection exceptions within OracleCatalogue --- catalogue/OracleCatalogue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/catalogue/OracleCatalogue.cpp b/catalogue/OracleCatalogue.cpp index 84cf04faf8..d8b6d840bf 100644 --- a/catalogue/OracleCatalogue.cpp +++ b/catalogue/OracleCatalogue.cpp @@ -328,6 +328,8 @@ void OracleCatalogue::deleteArchiveFileInternal(const std::string &diskInstanceN spc.add("TAPE FILE", tapeCopyLogStream.str()); } lc.log(log::INFO, "Archive file deleted from CTA catalogue"); + } catch(exception::LostDatabaseConnection &le) { + throw exception::LostDatabaseConnection(std::string(__FUNCTION__) + " failed: " + le.getMessage().str()); } catch(exception::UserError &) { throw; } catch(exception::Exception &ex) { @@ -487,6 +489,8 @@ void OracleCatalogue::deleteArchiveFileByDiskFileIdInternal(const std::string &d spc.add("TAPE FILE", tapeCopyLogStream.str()); } lc.log(log::INFO, "Archive file deleted from CTA catalogue"); + } catch(exception::LostDatabaseConnection &le) { + throw exception::LostDatabaseConnection(std::string(__FUNCTION__) + " failed: " + le.getMessage().str()); } catch(exception::UserError &) { throw; } catch(exception::Exception &ex) { -- GitLab