From 034459cb66580d0aa680ae96a18b5a884808386c Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 3 Apr 2024 12:32:34 +0200 Subject: zenremoteprojectstore with httpclient (#35) - Bugfix: Fix log of Success/Failure for oplog import - Improvement: Use HttpClient when doing oplog export/import with a zenserver as a remote target. Includes retry logic - Improvement: Increase the retry count to 4 (5 attempts in total) when talking to Jupiter for oplog export/import --- src/zenserver/projectstore/projectstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zenserver/projectstore/projectstore.cpp') diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index dd390d08c..0109533f6 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -209,7 +209,7 @@ namespace { std::string(Url), std::string(Project), std::string(Oplog)}; - RemoteStore = CreateZenRemoteStore(Options); + RemoteStore = CreateZenRemoteStore(Options, TempFilePath); } if (!RemoteStore) -- cgit v1.2.3 From 12b7bf1c16f671c83840961c37a339141a7ffbb3 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 4 Apr 2024 14:32:40 +0200 Subject: improved assert (#37) - Improvement: Add file and line to ASSERT exceptions - Improvement: Catch call stack when throwing assert exceptions and log/output call stack at important places to provide more context to caller --- src/zenserver/projectstore/projectstore.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/zenserver/projectstore/projectstore.cpp') diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 0109533f6..84ed6f842 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -1679,7 +1679,7 @@ ProjectStore::Project::WriteAccessTimes() WriteFile(ProjectAccessTimesFilePath, Data.GetBuffer().AsIoBuffer()); } - catch (std::exception& Err) + catch (const std::exception& Err) { ZEN_WARN("writing access times FAILED, reason: '{}'", Err.what()); } @@ -1714,7 +1714,7 @@ ProjectStore::Project::NewOplog(std::string_view OplogId, const std::filesystem: Log->Write(); return Log; } - catch (std::exception&) + catch (const std::exception&) { // In case of failure we need to ensure there's no half constructed entry around // @@ -1760,7 +1760,7 @@ ProjectStore::Project::OpenOplog(std::string_view OplogId) return Log; } - catch (std::exception& ex) + catch (const std::exception& ex) { ZEN_WARN("failed to open oplog '{}' @ '{}': {}", OplogId, OplogBasePath, ex.what()); @@ -2371,7 +2371,7 @@ ProjectStore::OpenProject(std::string_view ProjectId) Prj->Read(); return Prj; } - catch (std::exception& e) + catch (const std::exception& e) { ZEN_WARN("failed to open {} @ {} ({})", ProjectId, BasePath, e.what()); m_Projects.erase(std::string{ProjectId}); @@ -4017,7 +4017,7 @@ ProjectStore::CreateReferenceCheckers(GcCtx& Ctx) } } } - catch (std::exception&) + catch (const std::exception&) { while (!Checkers.empty()) { -- cgit v1.2.3