From 0abf7994e8913c19360a0f0b8527495c0f99de87 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Mon, 2 Oct 2023 12:00:00 +0200 Subject: Handle OOM and OOD more gracefully to not spam Sentry with error reports (#434) - Improvement: Catch Out Of Memory and Out Of Disk exceptions and report back to reqeuster without reporting an error to Sentry - Improvement: If creating bucket fails when storing and item in the structured cache, log a warning and propagate error to requester without reporting an error to Sentry - Improvement: Make an explicit flush of the active block written to in blockstore flush - Improvement: Make sure cache and cas MakeIndexSnapshot does not throw exception on failure which would cause and abnormal termniation at exit --- src/zencore/include/zencore/except.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/zencore/include') diff --git a/src/zencore/include/zencore/except.h b/src/zencore/include/zencore/except.h index 464852f88..6810e6ea9 100644 --- a/src/zencore/include/zencore/except.h +++ b/src/zencore/include/zencore/except.h @@ -66,4 +66,7 @@ public: inline explicit OptionParseException(const std::string& Message) : std::runtime_error(Message) {} }; +bool IsOOM(const std::system_error& SystemError); +bool IsOOD(const std::system_error& SystemError); + } // namespace zen -- cgit v1.2.3