aboutsummaryrefslogtreecommitdiff
path: root/zenserver/projectstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-12-02 16:37:22 +0100
committerGitHub <[email protected]>2022-12-02 07:37:22 -0800
commita07d68c0aea6cddd966986ad45045087e1cebfea (patch)
treea856aadb1c0a09f0da8557e734beaee0a4609ff9 /zenserver/projectstore.cpp
parentMake sure we always store record/op before attachments (#195) (diff)
downloadzen-a07d68c0aea6cddd966986ad45045087e1cebfea.tar.xz
zen-a07d68c0aea6cddd966986ad45045087e1cebfea.zip
reduce gc log spam (INFO -> DEBUG) (#199)
Diffstat (limited to 'zenserver/projectstore.cpp')
-rw-r--r--zenserver/projectstore.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp
index c60d5b405..c3f10c9cd 100644
--- a/zenserver/projectstore.cpp
+++ b/zenserver/projectstore.cpp
@@ -919,8 +919,9 @@ ProjectStore::Project::GatherReferences(GcContext& GcCtx)
ZEN_TRACE_CPU("ProjectStore::Project::GatherReferences");
Stopwatch Timer;
- const auto Guard = MakeGuard(
- [&] { ZEN_INFO("gathered references from project store project {} in {}", Identifier, NiceTimeSpanMs(Timer.GetElapsedTimeMs())); });
+ const auto Guard = MakeGuard([&] {
+ ZEN_DEBUG("gathered references from project store project {} in {}", Identifier, NiceTimeSpanMs(Timer.GetElapsedTimeMs()));
+ });
// GatherReferences needs to check all existing oplogs
std::vector<std::string> OpLogs = ScanForOplogs();
@@ -1084,11 +1085,11 @@ ProjectStore::GatherReferences(GcContext& GcCtx)
size_t ExpiredProjectCount = 0;
Stopwatch Timer;
const auto Guard = MakeGuard([&] {
- ZEN_INFO("gathered references from '{}' in {}, found {} active projects and {} expired projects",
- m_ProjectBasePath.string(),
- NiceTimeSpanMs(Timer.GetElapsedTimeMs()),
- ProjectCount,
- ExpiredProjectCount);
+ ZEN_DEBUG("gathered references from '{}' in {}, found {} active projects and {} expired projects",
+ m_ProjectBasePath.string(),
+ NiceTimeSpanMs(Timer.GetElapsedTimeMs()),
+ ProjectCount,
+ ExpiredProjectCount);
});
DiscoverProjects();
@@ -1125,11 +1126,11 @@ ProjectStore::CollectGarbage(GcContext& GcCtx)
Stopwatch Timer;
const auto Guard = MakeGuard([&] {
- ZEN_INFO("garbage collect from '{}' DONE after {}, found {} active projects and {} expired projects",
- m_ProjectBasePath.string(),
- NiceTimeSpanMs(Timer.GetElapsedTimeMs()),
- ProjectCount,
- ExpiredProjectCount);
+ ZEN_DEBUG("garbage collect from '{}' DONE after {}, found {} active projects and {} expired projects",
+ m_ProjectBasePath.string(),
+ NiceTimeSpanMs(Timer.GetElapsedTimeMs()),
+ ProjectCount,
+ ExpiredProjectCount);
});
std::vector<Ref<Project>> ExpiredProjects;
@@ -1149,7 +1150,7 @@ ProjectStore::CollectGarbage(GcContext& GcCtx)
if (ExpiredProjects.empty())
{
- ZEN_INFO("garbage collect SKIPPED, for '{}', no expired projects found", m_ProjectBasePath.string());
+ ZEN_DEBUG("garbage collect SKIPPED, for '{}', no expired projects found", m_ProjectBasePath.string());
return;
}
@@ -1167,20 +1168,20 @@ ProjectStore::CollectGarbage(GcContext& GcCtx)
RwLock::ExclusiveLockScope _(m_ProjectsLock);
if (!Project->IsExpired())
{
- ZEN_INFO("ProjectStore::CollectGarbage skipped garbage collect of project '{}'. Project no longer expired.", ProjectId);
+ ZEN_DEBUG("ProjectStore::CollectGarbage skipped garbage collect of project '{}'. Project no longer expired.", ProjectId);
continue;
}
bool Success = Project->PrepareForDelete(PathToRemove);
if (!Success)
{
- ZEN_INFO("ProjectStore::CollectGarbage skipped garbage collect of project '{}'. Project folder is locked.", ProjectId);
+ ZEN_DEBUG("ProjectStore::CollectGarbage skipped garbage collect of project '{}'. Project folder is locked.", ProjectId);
continue;
}
m_Projects.erase(Project->Identifier);
ProjectId = Project->Identifier;
}
- ZEN_INFO("ProjectStore::CollectGarbage garbage collected project '{}'. Removing storage on disk", ProjectId);
+ ZEN_DEBUG("ProjectStore::CollectGarbage garbage collected project '{}'. Removing storage on disk", ProjectId);
if (PathToRemove.empty())
{
continue;